xcf: Return early if seek fails

BUGS: 498381
This commit is contained in:
Albert Astals Cid
2025-01-09 02:33:51 +00:00
committed by Mirco Miranda
parent bda8487147
commit f296c38daf
+3 -1
View File
@@ -900,7 +900,9 @@ bool XCFImageFormat::readXCF(QIODevice *device, QImage *outImage)
while (!layer_offsets.isEmpty()) {
qint64 layer_offset = layer_offsets.pop();
xcf_io.device()->seek(layer_offset);
if (!xcf_io.device()->seek(layer_offset)) {
return false;
}
if (!loadLayer(xcf_io, xcf_image)) {
return false;