Make sure we always have copies of equipment descriptions

Having pointers copied around that might get freed elsewhere could be a
problem.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-11-14 13:33:12 -08:00
parent 1055b5afd3
commit 8d766e13e2
4 changed files with 13 additions and 5 deletions

View file

@ -632,7 +632,7 @@ bool WeightModel::setData(const QModelIndex &index, const QVariant &value, int r
int i = -1;
while (ws_info[++i].name) {
if (gettextFromC::instance()->tr(ws_info[i].name) == vString) {
ws->description = ws_info[i].name;
ws->description = copy_string(ws_info[i].name);
break;
}
}