git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26056
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
Cell cell, short dataOffset, short dataLength,
ListHandle listHandle )
{
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;
GrafPtr savePort;
GrafPtr grafPtr;
RgnHandle savedClipRegion;
SInt32 savedPenMode;
GetPort(&savePort);
SetPort((**listHandle).port);
grafPtr = (**listHandle).port ;
// typecast our refCon
GetPort(&savePort);
SetPort((**listHandle).port);
grafPtr = (**listHandle).port ;
// typecast our refCon
- list = (wxListBox*) GetControlReference( (ControlHandle) GetListRefCon(listHandle) );
// Calculate the cell rect.
// Calculate the cell rect.
wxListBox::~wxListBox()
{
FreeData() ;
wxListBox::~wxListBox()
{
FreeData() ;
+ // avoid access during destruction
+ SetControlReference( (ControlHandle) m_macControl , NULL ) ;
if ( m_macList )
{
#if !TARGET_CARBON
if ( m_macList )
{
#if !TARGET_CARBON
Cell cell, short dataOffset, short dataLength,
ListHandle listHandle )
{
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;
GrafPtr savePort;
GrafPtr grafPtr;
RgnHandle savedClipRegion;
SInt32 savedPenMode;
GetPort(&savePort);
SetPort((**listHandle).port);
grafPtr = (**listHandle).port ;
// typecast our refCon
GetPort(&savePort);
SetPort((**listHandle).port);
grafPtr = (**listHandle).port ;
// typecast our refCon
- list = (wxListBox*) GetControlReference( (ControlHandle) GetListRefCon(listHandle) );
// Calculate the cell rect.
// Calculate the cell rect.
wxListBox::~wxListBox()
{
FreeData() ;
wxListBox::~wxListBox()
{
FreeData() ;
+ // avoid access during destruction
+ SetControlReference( (ControlHandle) m_macControl , NULL ) ;
if ( m_macList )
{
#if !TARGET_CARBON
if ( m_macList )
{
#if !TARGET_CARBON