We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93a0708 commit 154bb2fCopy full SHA for 154bb2f
src/app/qgsattributetable.cpp
@@ -358,8 +358,15 @@ void QgsAttributeTable::contextMenuEvent(QContextMenuEvent *event)
358
mActionValues.clear();
359
360
for (int i = 0; i < columnCount(); ++i)
361
- mActionValues.push_back(std::make_pair(horizontalHeaderItem(i)->text(), item(row, i)->text()));
362
-
+ {
+ if (row >= 0) //prevent crash if row is negative, see ticket #1149
363
364
+ mActionValues.push_back(
365
+ std::make_pair(
366
+ horizontalHeaderItem( i )->text(),
367
+ item( row, i )->text() ) );
368
+ }
369
370
// The item that was clicked on, stored as an index into the
371
// mActionValues vector.
372
mClickedOnValue = col;
0 commit comments