1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 11:45:53 +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))
return QImage();
file.seek(_dataOffset);
if (!file.getChar(&bits))
if (!(file.seek(_dataOffset) && file.getChar(&bits)))
return QImage();
QImage img(_size, QImage::Format_Indexed8);