diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-05-25 11:15:37 +0200 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-05-25 16:57:51 +0200 |
commit | 578758835e700b38b167753ccda9527f3a8cc43b (patch) | |
tree | 7af4edaa5b77e0ce2a50b2214b784a5f07db25dd /desktop | |
parent | aed48f26fc8acbcc3a1eaf737619ef1f33d3cb29 (diff) |
desktop: check getDialog()
it might return nullptr
See https://crashreport.libreoffice.org/stats/signature/dp_gui::TheExtensionManager::ToTop()
Change-Id: I4023529aec0ba2c72b4e7db5449d235c208ee30b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152268
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx index 10a2cfb1f136..e844f09c1b85 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx @@ -158,7 +158,8 @@ void TheExtensionManager::SetText( const OUString &rTitle ) { const SolarMutexGuard guard; - getDialog()->set_title( rTitle ); + if (weld::Window* pDialog = getDialog()) + pDialog->set_title( rTitle ); } @@ -166,7 +167,8 @@ void TheExtensionManager::ToTop() { const SolarMutexGuard guard; - getDialog()->present(); + if (weld::Window* pDialog = getDialog()) + pDialog->present(); } void TheExtensionManager::Close() |