diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-05-25 11:15:37 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-05-28 20:59:29 +0200 |
commit | d21b384782f355b2b891c216ae8d73adcf3bf189 (patch) | |
tree | 0282595a7b3c40b7e63617b31d98f897df40a8f9 /desktop | |
parent | 0a0c5f7a755fdae43ad07764e36d6e0503828fd7 (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/+/152223
Tested-by: Jenkins
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() |