vcl/source/window/stacking.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit dff8e9123cac3e6e942e0c081e64fe1a591c37cb
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue May 27 17:16:21 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue May 27 21:29:41 2025 +0200

    move this check to earlier
    
    Change-Id: I3082b828327f0b235ad867001a643ad4766aa35e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185925
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index 142a3750b125..4ab141a2ca66 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -842,6 +842,12 @@ void Window::SetParent( vcl::Window* pNewParent )
     if( !pNewParent || pNewParent == this )
         return;
 
+    if (!mpWindowImpl)
+    {
+        SAL_WARN("vcl", "Window::SetParent(): mpWindowImpl == NULL");
+        return;
+    }
+
     // check if the taskpanelist would change and move the window pointer 
accordingly
     SystemWindow *pSysWin = ImplGetLastSystemWindow(this);
     SystemWindow *pNewSysWin = nullptr;
@@ -866,12 +872,6 @@ void Window::SetParent( vcl::Window* pNewParent )
 
     ImplSetFrameParent( pNewParent );
 
-    if (!mpWindowImpl)
-    {
-        SAL_WARN("vcl", "Window::SetParent(): mpWindowImpl == NULL");
-        return;
-    }
-
     if ( mpWindowImpl->mpBorderWindow )
     {
         mpWindowImpl->mpRealParent = pNewParent;

Reply via email to