diff options
Diffstat (limited to 'cui/source/options/optjsearch.cxx')
-rw-r--r-- | cui/source/options/optjsearch.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cui/source/options/optjsearch.cxx b/cui/source/options/optjsearch.cxx index d9f285b69c8c..3f83d602ce82 100644 --- a/cui/source/options/optjsearch.cxx +++ b/cui/source/options/optjsearch.cxx @@ -207,7 +207,10 @@ OUString SvxJSearchOptionsPage::GetAllStrings() OUString labels[] = { "label1", "label2" }; for (const auto& label : labels) - sAllStrings += m_xBuilder->weld_label(label)->get_label() + " "; + { + if (const auto& pString = m_xBuilder->weld_label(label)) + sAllStrings += pString->get_label() + " "; + } OUString checkButton[] = { "matchcase", "matchfullhalfwidth", @@ -230,7 +233,10 @@ OUString SvxJSearchOptionsPage::GetAllStrings() "ignoremiddledot" }; for (const auto& check : checkButton) - sAllStrings += m_xBuilder->weld_check_button(check)->get_label() + " "; + { + if (const auto& pString = m_xBuilder->weld_check_button(check)) + sAllStrings += pString->get_label() + " "; + } return sAllStrings.replaceAll("_", ""); } |