vcl/qt5/QtOpenGLContext.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit dd6bc1243af8d20cb19c96598f805cc6c9703ce7
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Jun 19 14:09:48 2024 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Jun 20 08:09:46 2024 +0200

    qt opengl: Drop superfluous check
    
    The `m_pChildWindow` is created in the lines
    above if not set before, so there's no need to check
    whether it's set. Assert instead.
    
    Change-Id: I1058897bc423b24be0f92c4dcc59c18801da45bf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169243
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/qt5/QtOpenGLContext.cxx b/vcl/qt5/QtOpenGLContext.cxx
index 9dd75b69a1c9..f0cf9b5f4c65 100644
--- a/vcl/qt5/QtOpenGLContext.cxx
+++ b/vcl/qt5/QtOpenGLContext.cxx
@@ -143,11 +143,9 @@ void QtOpenGLContext::initWindow()
         SystemWindowData winData = generateWinData(mpWindow, 
mbRequestLegacyContext);
         m_pChildWindow = VclPtr<SystemChildWindow>::Create(mpWindow, 0, 
&winData, false);
     }
+    assert(m_pChildWindow);
 
-    if (m_pChildWindow)
-    {
-        InitChildWindow(m_pChildWindow.get());
-    }
+    InitChildWindow(m_pChildWindow.get());
 
     m_pWindow
         = 
static_cast<QtObject*>(m_pChildWindow->ImplGetWindowImpl()->mpSysObj)->windowHandle();

Reply via email to