summaryrefslogtreecommitdiff
path: root/cui/source/tabpages
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-22 12:18:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-23 09:31:34 +0200
commit08c393a3d26dc336db790ad1900d598a039417b8 (patch)
tree03103f07f672247c39a7d8112e0610e348c1de3d /cui/source/tabpages
parentb6455d16e05fc417c2d1d55ef674ce521c2fdd14 (diff)
cid#1448463 Dereference null return value
Change-Id: I61285b8e34f58bbaaedb5fd67d181aee7e1e591d Reviewed-on: https://gerrit.libreoffice.org/76135 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/tabpages')
-rw-r--r--cui/source/tabpages/autocdlg.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 2ed5e4ac7c0c..3d4b86d637ba 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -171,9 +171,17 @@ IMPL_LINK_NOARG(OfaAutoCorrDlg, SelectLanguageHdl, weld::ComboBox&, void)
{
OString sPageId = GetCurPageId();
if (sPageId == "replace")
- static_cast<OfaAutocorrReplacePage*>(GetTabPage(sPageId))->SetLanguage(eNewLang);
+ {
+ OfaAutocorrReplacePage* pPage = static_cast<OfaAutocorrReplacePage*>(GetTabPage(sPageId));
+ assert(pPage);
+ pPage->SetLanguage(eNewLang);
+ }
else if (sPageId == "exceptions")
- static_cast<OfaAutocorrExceptPage*>(GetTabPage(sPageId))->SetLanguage(eNewLang);
+ {
+ OfaAutocorrExceptPage* pPage = static_cast<OfaAutocorrExceptPage*>(GetTabPage(sPageId));
+ assert(pPage);
+ pPage->SetLanguage(eNewLang);
+ }
}
}