Skip to content
Snippets Groups Projects
Commit 7e783f1b authored by Jarosław Staniek's avatar Jarosław Staniek
Browse files

Fix crash when deleting or renaming a table

It crashed when the table was not opened.

(regression since 3.1 Alpha)

BUG:379078
parent 36e73853
No related branches found
No related tags found
No related merge requests found
......@@ -173,6 +173,9 @@ tristate KexiTablePart::askForClosingObjectsUsingTableSchema(
{
Q_ASSERT(conn);
Q_ASSERT(table);
if (!window) {
return true;
}
QList<KDbTableSchemaChangeListener*> listeners
= KDbTableSchemaChangeListener::listeners(conn, table);
KexiTablePartTempData *temp = static_cast<KexiTablePartTempData*>(window->data());
......
......@@ -89,6 +89,8 @@ public:
//! Asks the user for approval if there is at least one object that listens for changes
//! of the schema. If there is no approval, returns @c cancelled.
//! On failure returns @c false.
//! If @a window is @c nullptr, @c true is returned immediately because there is no window to
//! care about.
//! Special case: listener that is equal to window->data() will be silently closed
//! without asking for confirmation. It is not counted when looking for objects that
//! are "blocking" changes of @a table.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment