diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-06-19 14:09:48 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-06-20 08:09:46 +0200 |
commit | dd6bc1243af8d20cb19c96598f805cc6c9703ce7 (patch) | |
tree | ad78363cc1bdc9c73a1729e35597a9f3298629bb /vcl/qt5 | |
parent | 1bde8595bde911063f200e9aac6f1ade87d4ad59 (diff) |
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.weghorn@posteo.de>
Diffstat (limited to 'vcl/qt5')
-rw-r--r-- | vcl/qt5/QtOpenGLContext.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
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(); |