https://bugs.kde.org/show_bug.cgi?id=446209
--- Comment #6 from Dmitry Kazakov <dimul...@gmail.com> --- Git commit 763bd11a7eb85953afc101a00882d27b2d69a07a by Dmitry Kazakov. Committed on 17/12/2021 at 09:51. Pushed by dkazakov into branch 'krita/5.0'. Fix memory corruptions (and crashes) in File Layers 1) When we copy the image on saving, we will call KisFileLayer::setImage(), which transitively calls to KisFileLayer::slotLoadingFinished(), which could convert the image pointer to the strong one. That could cause a crash, because the image was not constructed yet, therefore its refernce counter was still zero. 2) When we copy the layer into the clipboard and destroy its (temporary) image, we should clear all the references to this layer, such as KisNode::image() and KisNode::graphListener(). Otherwise it could cause a memory corruption, when the layer in the clipboard could call setDirty() on the external image change. Related: bug 441945 M +3 -0 libs/image/kis_image.cc M +3 -1 libs/ui/flake/kis_shape_layer.cc M +27 -2 libs/ui/kis_file_layer.cpp https://invent.kde.org/graphics/krita/commit/763bd11a7eb85953afc101a00882d27b2d69a07a -- You are receiving this mail because: You are watching all bug changes.