Bug 363845 - Use of pointer after deallocation
Summary: Use of pointer after deallocation
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools (other bugs)
Version First Reported In: unspecified
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-02 15:09 UTC by maddin200
Modified: 2016-06-07 07:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description maddin200 2016-06-02 15:09:08 UTC
krita-master\libs\vectorimage\libwmf\WmfPainterBackend.cpp line 84
Code:
  if (mPainter && mIsInternalPainter)
        delete mPainter;

    mTarget = mPainter->device();

Reproducible: Always




better:

if (mPainter != NULL)
{
  mTarget = mPainter->device();
}
Comment 1 Halla Rempt 2016-06-07 07:36:56 UTC
Git commit 6bc432f8d4e70e515cd0ab2221cc5dd35fe10d27 by Boudewijn Rempt.
Committed on 07/06/2016 at 07:15.
Pushed by rempt into branch 'krita/3.0'.

No idea what Inge actually was doing here, it looks like he
stopped in the middle of a refactoring. But since mTarget is
set in the constructor and in the copy constructor, we don't
need any of this in any case.

Maybe we should remove the whole library, who needs
wmf after all..

M  +8    -16   libs/vectorimage/libwmf/WmfPainterBackend.cpp

http://commits.kde.org/krita/6bc432f8d4e70e515cd0ab2221cc5dd35fe10d27