• Dmitry Kazakov's avatar
    Fix for a crash when saving a document after adding a text shape · 3dffd58b
    Dmitry Kazakov authored
    Summary:
    This patch should fix a crash that happens after
    KisShapeLayerCanvas::repaint() is called on a cloned image. Actually,
    KisShapeLayer::setImage() was implemented incorrectly. It deleted
    m_d->converter and m_d->paintDevice, although canvas still owned a link
    to them. Therefore the next coming update crashed the application.
    
    BUG:372357
    
    Test Plan:
    I could never reproduce the original bug, I only used the results of
    Boud's valgrind output. So please test the original bug with the patch
    before I push it into 3.1 and impex.
    
    Reviewers: #krita, rempt
    
    Differential Revision: https://phabricator.kde.org/D3452
    3dffd58b