forked from qt-creator/qt-creator
Fix crash in context menu for edit formats.
Ensure type is in range. Change-Id: I850eab05d365fca4fbf86ca3e7753e117d3f2f2a Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -616,8 +616,10 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
|
|
||||||
const QStringList alternativeFormats =
|
const QStringList alternativeFormats =
|
||||||
mi0.data(LocalsTypeFormatListRole).toStringList();
|
mi0.data(LocalsTypeFormatListRole).toStringList();
|
||||||
const int typeFormat =
|
int typeFormat =
|
||||||
mi0.data(LocalsTypeFormatRole).toInt();
|
mi0.data(LocalsTypeFormatRole).toInt();
|
||||||
|
if (typeFormat >= alternativeFormats.size())
|
||||||
|
typeFormat = -1;
|
||||||
const int individualFormat =
|
const int individualFormat =
|
||||||
mi0.data(LocalsIndividualFormatRole).toInt();
|
mi0.data(LocalsIndividualFormatRole).toInt();
|
||||||
const int unprintableBase = handler->unprintableBase();
|
const int unprintableBase = handler->unprintableBase();
|
||||||
|
|||||||
Reference in New Issue
Block a user