summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/options/treeopt.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 4163cc906945..e801425ad7a9 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -847,7 +847,9 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
{
std::unique_ptr<weld::TreeIter> xEntry(xTreeLB->make_iterator());
- xTreeLB->get_cursor(xEntry.get());
+ if (!xTreeLB->get_cursor(xEntry.get()))
+ return;
+
if (xCurrentPageEntry && xCurrentPageEntry->equal(*xEntry))
return;