From 8fbfa7ec66b6f6e05b315aa4c16414ca441a9952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 16 Jul 2024 07:43:22 +0000 Subject: [PATCH] Bug 1905253 - Add a null-check in AppWindow::MoveResize. r=smaug, a=RyanVM Much like the method we forward to. Differential Revision: https://phabricator.services.mozilla.com/D216580 --- xpfe/appshell/AppWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xpfe/appshell/AppWindow.cpp b/xpfe/appshell/AppWindow.cpp index 8f87bbd1fb8c..93b6845719b5 100644 --- a/xpfe/appshell/AppWindow.cpp +++ b/xpfe/appshell/AppWindow.cpp @@ -760,8 +760,8 @@ AppWindow::GetDimensions(DimensionKind aDimensionKind, int32_t* aX, int32_t* aY, nsresult AppWindow::MoveResize(const Maybe& aPosition, const Maybe& aSize, bool aRepaint) { + NS_ENSURE_STATE(mWindow); DesktopToLayoutDeviceScale scale = mWindow->GetDesktopToDeviceScale(); - return MoveResize(aPosition ? Some(*aPosition / scale) : Nothing(), aSize ? Some(*aSize / scale) : Nothing(), aRepaint); }