Prevent crash when menu item is selected to early.

This commit is contained in:
eelke 2021-09-29 19:39:42 +02:00
parent 144321a5d3
commit 482be432d3

View file

@ -261,6 +261,9 @@ void DatabaseWindow::newCrudPage(Oid tableoid)
void DatabaseWindow::newCatalogInspectorPage(QString caption, NamespaceFilter filter) void DatabaseWindow::newCatalogInspectorPage(QString caption, NamespaceFilter filter)
{ {
if (!m_database)
return; // would be better if we queued the operation for later
auto ct = new CatalogInspector(m_database, this); auto ct = new CatalogInspector(m_database, this);
ct->addAction(actionRefreshCatalog); ct->addAction(actionRefreshCatalog);