summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/models.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 2bb40ef59..0778b7bca 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -1217,9 +1217,6 @@ QVariant DiveItem::data(int column, int role) const
case CYLINDER:
retVal = QString(dive->cylinder[0].type.description);
break;
- case GAS:
- retVal = QString(get_dive_gas_string(dive));
- break;
case SAC:
retVal = displaySac();
break;
@@ -1232,6 +1229,11 @@ QVariant DiveItem::data(int column, int role) const
case LOCATION:
retVal = QString(dive->location);
break;
+ case GAS:
+ const char *gas_string = get_dive_gas_string(dive);
+ retVal = QString(gas_string);
+ free((void*)gas_string);
+ break;
}
break;
case Qt::ToolTipRole: