summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-14 13:33:12 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-14 13:45:54 -0800
commit8d766e13e258e206edb2c2746895845de942fa8e (patch)
tree435f3287c34cd20e3da037940dd5349f45861c56 /qt-ui/models.cpp
parent1055b5afd35526c552eafcaf26d5f1d9aac43c86 (diff)
downloadsubsurface-8d766e13e258e206edb2c2746895845de942fa8e.tar.gz
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>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index e62598479..f73b1dc94 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -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;
}
}