From 7606562f289ab0488892ca11c41137a8ba207ce5 Mon Sep 17 00:00:00 2001 From: Treeki Date: Mon, 13 Aug 2012 02:12:01 +0200 Subject: fixed segfault when you try to move panes to the top level(invalid)... --- lsscenemodel.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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; -- cgit v1.2.3