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:
parent
d769ec4f06
commit
065d52d98b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user