If we can't find the dive, simply return no data
This seems better than forcing a crash or accessing random data. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7357633905
commit
f10b66237e
@ -1138,6 +1138,8 @@ QVariant DiveItem::data(int column, int role) const
|
||||
{
|
||||
QVariant retVal;
|
||||
struct dive *dive = get_dive_by_uniq_id(diveId);
|
||||
if (!dive)
|
||||
return QVariant();
|
||||
|
||||
switch (role) {
|
||||
case Qt::TextAlignmentRole:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user