summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-01-13 16:28:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-01-14 10:09:28 +0100
commit45ef56be4febb73924ccc1a1902adf53f00a20ce (patch)
tree01210d7e7d276845bb082b5fc61bae26898150a7 /dbaccess
parent0a675cf23d042c5887532af8472ba5b4d82c5847 (diff)
Resolves: tdf#139299 crash on gaining focus during dispose
Change-Id: I5fd2b3cec7dd0c2c10c88006ef1812e57b547e0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109238 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess')
-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();