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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user