https://bugs.kde.org/show_bug.cgi?id=414672

Boudewijn Rempt <b...@valdyas.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|REOPENED                    |RESOLVED
      Latest Commit|https://invent.kde.org/kde/ |https://invent.kde.org/kde/
                   |krita/commit/2dc2ed5f5a6be2 |krita/commit/47423c9abab188
                   |b81aab5001de8389e3f3cbdcac  |a53c4003a09ce6bdf0824baef9

--- Comment #20 from Boudewijn Rempt <b...@valdyas.org> ---
Git commit 47423c9abab188a53c4003a09ce6bdf0824baef9 by Boudewijn Rempt, on
behalf of Dmitry Kazakov.
Committed on 08/01/2020 at 14:13.
Pushed by rempt into branch 'krita/4.2'.

Fix a crash when cancelling Transform Tool action

The crash happens only on systems that have asserts enabled, that
is, don't have NDEBUG defined.

Binding uninitialized '*m_savedTransformArgs' to a cont-reference
generated valid c++ code (a reference initialized with nullptr),
and given that finishStrokeImpl() didn't try to use/dereference
this reference, the code worked fine and didn't crash on systems
without asserts.

But on systems with asserts enabled (non NDEBUG), boost::optional
triggered a sanity check assert for dereferencing nullptr and crashed
the application.

The patch removes entire code for resetting m_savedTransformArgs in
cancelStrokeCallback(). It was actually an artifact of some initial
refactoring.

Thanks Fredrik Hansson for pointing out the problem!
https://invent.kde.org/kde/krita/merge_requests/197
(cherry picked from commit 2dc2ed5f5a6be2b81aab5001de8389e3f3cbdcac)

M  +1    -8   
plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp

https://invent.kde.org/kde/krita/commit/47423c9abab188a53c4003a09ce6bdf0824baef9

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to