diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-05-16 16:55:28 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-05-16 16:55:28 +0000 |
| commit | 9c1388c7964bd3b4ae147e39c146c96dc20947e9 (patch) | |
| tree | 09628e1b12604d3194b7056c31df0573af4239bd /pokemodr/PokemodTreeModel.cpp | |
| parent | a2a81fa0eee00670a1e18918458f6ac12860d59c (diff) | |
| download | sigen-9c1388c7964bd3b4ae147e39c146c96dc20947e9.tar.gz sigen-9c1388c7964bd3b4ae147e39c146c96dc20947e9.tar.xz sigen-9c1388c7964bd3b4ae147e39c146c96dc20947e9.zip | |
[FIX] TypeModel done for data() in models
[FIX] Another Qt bug found :(
[FIX] Better connections for the editor widget
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@141 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/PokemodTreeModel.cpp')
| -rw-r--r-- | pokemodr/PokemodTreeModel.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pokemodr/PokemodTreeModel.cpp b/pokemodr/PokemodTreeModel.cpp index 2844f73f..7acac2cf 100644 --- a/pokemodr/PokemodTreeModel.cpp +++ b/pokemodr/PokemodTreeModel.cpp @@ -56,6 +56,8 @@ QModelIndex PokemodTreeModel::index(int row, int /*column*/, const QModelIndex& if (row < 0) return createIndex(row, 0, m_root); BaseModel* object = getItem(parent)->childItem(row); + if (!object) + qDebug("Creating NULL index!"); return createIndex(row, 0, object); } @@ -64,6 +66,8 @@ QModelIndex PokemodTreeModel::parent(const QModelIndex& index) const if (!index.isValid()) return QModelIndex(); BaseModel* object = static_cast<BaseModel*>(index.internalPointer()); + if (!object) + return QModelIndex(); BaseModel* parent = object->parent(); if (!parent || (parent == m_root)) return QModelIndex(); |
