summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/dialog/optgrid.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index ccbfe836fcb8..736c9c798827 100644
--- a/svx/source/dialog/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
@@ -157,14 +157,20 @@ OUString SvxGridTabPage::GetAllStrings()
"divisionx", "label4", "divisiony", "label5", "label8", "label9" };
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[]
= { "usegridsnap", "gridvisible", "synchronize", "snaphelplines", "snapborder",
"snapframe", "snappoints", "ortho", "bigortho", "rotate" };
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("_", "");
}