summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowListBox.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index 53f1d45a72cd..bef75317d17a 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -237,11 +237,14 @@ void OTableWindowListBox::GetFocus()
if (m_pTabWin)
m_pTabWin->setActive();
- std::unique_ptr<weld::TreeIter> xCurrent = m_xTreeView->make_iterator();
- if (m_xTreeView->get_cursor(xCurrent.get()))
+ if (m_xTreeView)
{
- m_xTreeView->unselect_all();
- m_xTreeView->select(*xCurrent);
+ std::unique_ptr<weld::TreeIter> xCurrent = m_xTreeView->make_iterator();
+ if (m_xTreeView->get_cursor(xCurrent.get()))
+ {
+ m_xTreeView->unselect_all();
+ m_xTreeView->select(*xCurrent);
+ }
}
InterimItemWindow::GetFocus();