1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Propper error handling

This commit is contained in:
Martin Tůma 2021-02-07 11:46:03 +01:00
parent d769ec4f06
commit 065d52d98b

View File

@ -374,8 +374,7 @@ QImage BSBMap::readImage()
if (!file.open(QIODevice::ReadOnly)) if (!file.open(QIODevice::ReadOnly))
return QImage(); return QImage();
file.seek(_dataOffset); if (!(file.seek(_dataOffset) && file.getChar(&bits)))
if (!file.getChar(&bits))
return QImage(); return QImage();
QImage img(_size, QImage::Format_Indexed8); QImage img(_size, QImage::Format_Indexed8);