History

Fix crash in Running Scripts when edit filter after highlighting script

David Rowe committed 10 years ago

Commit 51cb9dd1 parent 29b95921 file · +3 −0Browse files

Showing the changes to libraries/script-engine/src/ScriptsModel.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/ScriptsModel.cpp+3−0
@@ -99,6 +99,9 @@ QModelIndex ScriptsModel::parent(const QModelIndex& child) const { · 98 unmodified lines
99 99
100QVariant ScriptsModel::data(const QModelIndex& index, int role) const {100QVariant ScriptsModel::data(const QModelIndex& index, int role) const {
101 TreeNodeBase* node = getTreeNodeFromIndex(index);101 TreeNodeBase* node = getTreeNodeFromIndex(index);
102 if (!node) {
103 return QVariant();
104 }
102 if (node->getType() == TREE_NODE_TYPE_SCRIPT) {105 if (node->getType() == TREE_NODE_TYPE_SCRIPT) {
103 TreeNodeScript* script = static_cast<TreeNodeScript*>(node);106 TreeNodeScript* script = static_cast<TreeNodeScript*>(node);
104 if (role == Qt::DisplayRole) {107 if (role == Qt::DisplayRole) {