Fix crash in Running Scripts when edit filter after highlighting script

This commit is contained in:
David Rowe 2016-01-16 15:50:33 +13:00
parent 29b9592c8c
commit 51cb9dd05e

View file

@ -99,6 +99,9 @@ QModelIndex ScriptsModel::parent(const QModelIndex& child) const {
QVariant ScriptsModel::data(const QModelIndex& index, int role) const {
TreeNodeBase* node = getTreeNodeFromIndex(index);
if (!node) {
return QVariant();
}
if (node->getType() == TREE_NODE_TYPE_SCRIPT) {
TreeNodeScript* script = static_cast<TreeNodeScript*>(node);
if (role == Qt::DisplayRole) {