diff options
author | Jonathan Bauer | 2015-10-30 17:53:44 +0100 |
---|---|---|
committer | Jonathan Bauer | 2015-10-30 17:53:44 +0100 |
commit | 683172cd4efb7a310e675dcc2eca319c081f13c7 (patch) | |
tree | ee620117a4dfc989ab789df012db5c35a403927f | |
parent | Make default icon determination smarter (diff) | |
download | vmchooser2-683172cd4efb7a310e675dcc2eca319c081f13c7.tar.gz vmchooser2-683172cd4efb7a310e675dcc2eca319c081f13c7.tar.xz vmchooser2-683172cd4efb7a310e675dcc2eca319c081f13c7.zip |
NULL check on the SessionItem....
-rw-r--r-- | src/dialog.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp index e13bb81..cccf3b4 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -90,6 +90,9 @@ void Dialog::on_treeView_doubleClicked(QModelIndex index) SessionTreeItem* item = static_cast<SessionTreeItem*>(index.internalPointer()); + if (item == NULL) + return; // do nothing if cast failed + const Session* s(item->session()); if (s == NULL) // no valid session has been selected, do nothing return; |