diff options
author | Treeki <treeki@gmail.com> | 2012-08-13 02:12:01 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-08-13 02:12:01 +0200 |
commit | 7606562f289ab0488892ca11c41137a8ba207ce5 (patch) | |
tree | 8bbb571d2dad5762b2458fc0f4cf4f3740bc41fb /lsscenemodel.cpp | |
parent | 86b4b22662426cc0127620de1e6451f1a2e1da79 (diff) | |
download | LayoutStudio-7606562f289ab0488892ca11c41137a8ba207ce5.tar.gz LayoutStudio-7606562f289ab0488892ca11c41137a8ba207ce5.zip |
fixed segfault when you try to move panes to the top level(invalid)...
Diffstat (limited to '')
-rw-r--r-- | lsscenemodel.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lsscenemodel.cpp b/lsscenemodel.cpp index f5c4ba3..acb059c 100644 --- a/lsscenemodel.cpp +++ b/lsscenemodel.cpp @@ -110,6 +110,11 @@ bool LSSceneModel::insertRows(int row, int count, const QModelIndex &parent) { return false; } + if (!parent.isValid()) { + qWarning("can't move stuff to the top level"); + return false; + } + m_movingPaneParent = new QPersistentModelIndex(parent); m_movingPaneRow = row; m_movingPaneCount = count; |