safe destruction, even if redraws might be triggered
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b2247ee93b
commit
21956470c7
@ -72,16 +72,19 @@ static pascal void wxMacListDefinition( short message, Boolean isSelected, Rect
|
||||
Cell cell, short dataOffset, short dataLength,
|
||||
ListHandle listHandle )
|
||||
{
|
||||
wxListBox* list;
|
||||
list = (wxListBox*) GetControlReference( (ControlHandle) GetListRefCon(listHandle) );
|
||||
if ( list == NULL )
|
||||
return ;
|
||||
|
||||
GrafPtr savePort;
|
||||
GrafPtr grafPtr;
|
||||
RgnHandle savedClipRegion;
|
||||
SInt32 savedPenMode;
|
||||
wxListBox* list;
|
||||
GetPort(&savePort);
|
||||
SetPort((**listHandle).port);
|
||||
grafPtr = (**listHandle).port ;
|
||||
// typecast our refCon
|
||||
list = (wxListBox*) GetControlReference( (ControlHandle) GetListRefCon(listHandle) );
|
||||
|
||||
// Calculate the cell rect.
|
||||
|
||||
@ -313,6 +316,8 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
||||
wxListBox::~wxListBox()
|
||||
{
|
||||
FreeData() ;
|
||||
// avoid access during destruction
|
||||
SetControlReference( (ControlHandle) m_macControl , NULL ) ;
|
||||
if ( m_macList )
|
||||
{
|
||||
#if !TARGET_CARBON
|
||||
|
@ -72,16 +72,19 @@ static pascal void wxMacListDefinition( short message, Boolean isSelected, Rect
|
||||
Cell cell, short dataOffset, short dataLength,
|
||||
ListHandle listHandle )
|
||||
{
|
||||
wxListBox* list;
|
||||
list = (wxListBox*) GetControlReference( (ControlHandle) GetListRefCon(listHandle) );
|
||||
if ( list == NULL )
|
||||
return ;
|
||||
|
||||
GrafPtr savePort;
|
||||
GrafPtr grafPtr;
|
||||
RgnHandle savedClipRegion;
|
||||
SInt32 savedPenMode;
|
||||
wxListBox* list;
|
||||
GetPort(&savePort);
|
||||
SetPort((**listHandle).port);
|
||||
grafPtr = (**listHandle).port ;
|
||||
// typecast our refCon
|
||||
list = (wxListBox*) GetControlReference( (ControlHandle) GetListRefCon(listHandle) );
|
||||
|
||||
// Calculate the cell rect.
|
||||
|
||||
@ -313,6 +316,8 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
||||
wxListBox::~wxListBox()
|
||||
{
|
||||
FreeData() ;
|
||||
// avoid access during destruction
|
||||
SetControlReference( (ControlHandle) m_macControl , NULL ) ;
|
||||
if ( m_macList )
|
||||
{
|
||||
#if !TARGET_CARBON
|
||||
|
Loading…
Reference in New Issue
Block a user