Commit 9043898f authored by Friedemann Kleint's avatar Friedemann Kleint Committed by hjk
Browse files

Fix crash in context menu for edit formats.



Ensure type is in range.

Change-Id: I850eab05d365fca4fbf86ca3e7753e117d3f2f2a
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 82b781f5
......@@ -616,8 +616,10 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
const QStringList alternativeFormats =
mi0.data(LocalsTypeFormatListRole).toStringList();
const int typeFormat =
int typeFormat =
mi0.data(LocalsTypeFormatRole).toInt();
if (typeFormat >= alternativeFormats.size())
typeFormat = -1;
const int individualFormat =
mi0.data(LocalsIndividualFormatRole).toInt();
const int unprintableBase = handler->unprintableBase();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment