summaryrefslogtreecommitdiffstats
path: root/src/dialog.cpp
diff options
context:
space:
mode:
authorJonathan Bauer2015-10-30 17:53:44 +0100
committerJonathan Bauer2015-10-30 17:53:44 +0100
commit683172cd4efb7a310e675dcc2eca319c081f13c7 (patch)
treeee620117a4dfc989ab789df012db5c35a403927f /src/dialog.cpp
parentMake default icon determination smarter (diff)
downloadvmchooser2-683172cd4efb7a310e675dcc2eca319c081f13c7.tar.gz
vmchooser2-683172cd4efb7a310e675dcc2eca319c081f13c7.tar.xz
vmchooser2-683172cd4efb7a310e675dcc2eca319c081f13c7.zip
NULL check on the SessionItem....
Diffstat (limited to 'src/dialog.cpp')
-rw-r--r--src/dialog.cpp3
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;