Changeset [529f98be9e270a5e6e98dca13c6786f3e4fdfb73] by Jocelyn Legault

October 14th, 2010 @ 05:19 AM

Fix heap corruption with color picker/popup.

ColorPicker owns a colorPopup and maintains its life cycle.
However, when colorPopup sent either a WM_PICKUP_COLOR or a WM_PICKUP_CANCEL
to its parent (the colorPicker), the parent deleted the colorPopup. Therefore
the returning call ended up in a destroyed object.
The fix is rather simple. Instead of constantly creating and deleting the
colorPopup, we simply create it the first time it's used, and hide and show it
afterwards. The colorPopup is finally destroyed when the colorPicker is destroyed.

[#45]

Signed-off-by: Jocelyn Legault jocelynlegault@gmail.com
http://github.com/joce/npp-community/commit/529f98be9e270a5e6e98dca...

Committed by Jocelyn Legault

  • M PowerEditor/src/WinControls/ColourPicker/ColourPicker.cpp
  • M PowerEditor/src/WinControls/ColourPicker/ColourPicker.h
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Notepad++ Community Release

Shared Ticket Bins