summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-12-03 16:10:39 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-12-04 08:36:46 +0100
commit3e144ccb3cd9a1a093357b55140cc0be61beb3f7 (patch)
tree7e709bf1ba69125528a06dc87115aa941828009b /vcl/source
parent02bc6cd589ae4bf8469afea297b970d579a12229 (diff)
vcl: Slightly simplify check in MenuBarWindow::KillActivePopup
Use existing PopupMenu::ImplGetFloatingWindow instead of casting manually. Change-Id: I9449130e077fc997d724d5fadc854a278ba16cce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177746 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/menubarwindow.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 9eaaba67db81..a4eb0f74952a 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -350,9 +350,9 @@ void MenuBarWindow::KillActivePopup()
if ( !m_pActivePopup )
return;
- if (m_pActivePopup->m_pWindow)
- if (static_cast<FloatingWindow *>(m_pActivePopup->m_pWindow.get())->IsInCleanUp())
- return; // kill it later
+ FloatingWindow* pFloatWin = m_pActivePopup->ImplGetFloatingWindow();
+ if (pFloatWin && pFloatWin->IsInCleanUp())
+ return; // kill it later
if ( m_pActivePopup->bInCallback )
m_pActivePopup->bCanceled = true;