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

Dmitry Kazakov <dimul...@gmail.com> changed:

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

--- Comment #12 from Dmitry Kazakov <dimul...@gmail.com> ---
Git commit 2dc2ed5f5a6be2b81aab5001de8389e3f3cbdcac by Dmitry Kazakov.
Committed on 04/12/2019 at 17:41.
Pushed by dkazakov into branch 'master'.

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

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

https://invent.kde.org/kde/krita/commit/2dc2ed5f5a6be2b81aab5001de8389e3f3cbdcac

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

Reply via email to