Fixing dubious crash at core connect (courtesy of EgS finding and Sput testing the...
[quassel.git] / src / client / treemodel.cpp
index 2a2ed85..18f7c4f 100644 (file)
@@ -387,7 +387,7 @@ void TreeModel::itemDataChanged(int column) {
 
   if(column == -1) {
     leftIndex = createIndex(item->row(), 0, item);
-    rightIndex = createIndex(item->row(), item->columnCount(), item);
+    rightIndex = createIndex(item->row(), item->columnCount()-1, item);
   } else {
     leftIndex = createIndex(item->row(), column, item);
     rightIndex = leftIndex;