Commit 311d804a authored by Agata Cacko's avatar Agata Cacko

Fix segfault when loading .kra file with a ref pic

There was a crash caused by not checking if anything is on the reference
images layer before updating it. This commit fixes this behaviour.
Reference images should still load just fine.

BUG:408927
parent 420635d1
......@@ -173,6 +173,8 @@ void KisReferenceImagesDecoration::setReferenceImageLayer(KisSharedPtr<KisRefere
d->layer = layer;
connect(layer.data(), SIGNAL(sigUpdateCanvas(QRectF)),
this, SLOT(slotReferenceImagesChanged(QRectF)));
slotReferenceImagesChanged(layer->extent());
if (layer->extent() != QRectF()) { // in case the reference layer is just being loaded from the .kra file
slotReferenceImagesChanged(layer->extent());
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment