1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-17 20:34:23 +02:00

Fixed possible crash when the cache wouldn't accept the new item

This commit is contained in:
2019-05-12 01:23:18 +02:00
parent 5cd0a3a8b0
commit 8f799e1bcf
3 changed files with 11 additions and 14 deletions

View File

@ -33,8 +33,7 @@ bool SubFile::seek(Handle &handle, quint32 pos) const
if (handle.blockNum != blockNum) {
if (blockNum >= _blocks.size())
return false;
handle.data = _img->readBlock(_blocks.at(blockNum));
if (handle.data.isNull())
if (!_img->readBlock(_blocks.at(blockNum), handle.data))
return false;
handle.blockNum = blockNum;
}