diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2022-09-27 23:42:26 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2022-09-30 13:01:32 +0200 |
commit | 79e450749d58e21cad747592f49e505830184d74 (patch) | |
tree | fface0c20ef94d01383fc5ce031585b965ca255f /framework | |
parent | e6a46b235997c309a926bb0573de625a89b29b8c (diff) |
tdf#151172 crash in notebookbar with extension enabled
Change-Id: I60d777b27ffee095807490f4b181b1b08ed88462
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140683
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/generictoolbarcontroller.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index f61a0d0150b9..1fd8998f0460 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -356,8 +356,9 @@ ImageOrientationController::ImageOrientationController(const Reference<XComponen void ImageOrientationController::dispose() { ToolboxController::dispose(); - if (!m_pToolbar) - VCLUnoHelper::GetWindow(getParent())->RemoveEventListener(LINK(this, ImageOrientationController, WindowEventListener)); + VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(getParent()); + if (pWindow) + pWindow->RemoveEventListener(LINK(this, ImageOrientationController, WindowEventListener)); } IMPL_LINK(ImageOrientationController, WindowEventListener, VclWindowEvent&, rWindowEvent, void) |