mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix crash opening testdive0.xml
That particular dive didn't have a temperature, and thus we got a crash while accessing the last temperature text. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
191a3064a7
commit
021d799ff9
1 changed files with 2 additions and 1 deletions
|
@ -267,7 +267,8 @@ void DiveTemperatureItem::modelDataChanged(const QModelIndex& topLeft, const QMo
|
|||
((abs(last_valid_temp - last_printed_temp) > 500) || ((double)last / (double)sec < 0.75))) {
|
||||
createTextItem(sec, last_valid_temp);
|
||||
}
|
||||
texts.last()->setAlignment(Qt::AlignLeft | Qt::AlignBottom);
|
||||
if( texts.count())
|
||||
texts.last()->setAlignment(Qt::AlignLeft | Qt::AlignBottom);
|
||||
}
|
||||
|
||||
void DiveTemperatureItem::createTextItem(int sec, int mkelvin)
|
||||
|
|
Loading…
Add table
Reference in a new issue