diff options
Diffstat (limited to 'qt-models/weightmodel.cpp')
-rw-r--r-- | qt-models/weightmodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/weightmodel.cpp b/qt-models/weightmodel.cpp index 77114eaea..b8e9ffa5d 100644 --- a/qt-models/weightmodel.cpp +++ b/qt-models/weightmodel.cpp @@ -107,7 +107,7 @@ bool WeightModel::setData(const QModelIndex &index, const QVariant &value, int r if (!ws->description || gettextFromC::tr(ws->description) != vString) { // loop over translations to see if one matches int i = -1; - while (ws_info[++i].name) { + while (ws_info[++i].name && i < MAX_WS_INFO) { if (gettextFromC::tr(ws_info[i].name) == vString) { ws->description = copy_string(ws_info[i].name); break; |