From: Stefan Csomor Date: Mon, 10 Feb 2003 19:15:13 +0000 (+0000) Subject: bug fixes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2ad50cc75b44bdb79c3c1a031e1a548d0fa5bfb9 bug fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/tooltip.cpp b/src/mac/carbon/tooltip.cpp index 1dfb2dfb14..5d072cb098 100644 --- a/src/mac/carbon/tooltip.cpp +++ b/src/mac/carbon/tooltip.cpp @@ -240,12 +240,15 @@ void wxMacToolTip::Draw() LocalToGlobal( (Point *) &tag.absHotRect.bottom ); SetPort( port ); if( m_helpTextRef ) - CFRelease( m_helpTextRef ) + { + CFRelease( m_helpTextRef ) ; + m_helpTextRef = NULL ; + } m_helpTextRef = wxMacCreateCFString(m_label) ; tag.content[kHMMinimumContentIndex].contentType = kHMCFStringContent ; - tag.content[kHMMinimumContentIndex].u.tagCFString = text ; + tag.content[kHMMinimumContentIndex].u.tagCFString = m_helpTextRef ; tag.content[kHMMaximumContentIndex].contentType = kHMCFStringContent ; - tag.content[kHMMaximumContentIndex].u.tagCFString = text ; + tag.content[kHMMaximumContentIndex].u.tagCFString = m_helpTextRef ; tag.tagSide = kHMDefaultSide; HMDisplayTag( &tag ); } @@ -452,7 +455,10 @@ void wxMacToolTip::Clear() #if TARGET_CARBON HMHideTag() ; if( m_helpTextRef ) - CFRelease( m_helpTextRef ) + { + CFRelease( m_helpTextRef ) ; + m_helpTextRef = NULL ; + } #else if ( m_window == s_ToolTipWindowRef && m_backpict ) { diff --git a/src/mac/tooltip.cpp b/src/mac/tooltip.cpp index 1dfb2dfb14..5d072cb098 100644 --- a/src/mac/tooltip.cpp +++ b/src/mac/tooltip.cpp @@ -240,12 +240,15 @@ void wxMacToolTip::Draw() LocalToGlobal( (Point *) &tag.absHotRect.bottom ); SetPort( port ); if( m_helpTextRef ) - CFRelease( m_helpTextRef ) + { + CFRelease( m_helpTextRef ) ; + m_helpTextRef = NULL ; + } m_helpTextRef = wxMacCreateCFString(m_label) ; tag.content[kHMMinimumContentIndex].contentType = kHMCFStringContent ; - tag.content[kHMMinimumContentIndex].u.tagCFString = text ; + tag.content[kHMMinimumContentIndex].u.tagCFString = m_helpTextRef ; tag.content[kHMMaximumContentIndex].contentType = kHMCFStringContent ; - tag.content[kHMMaximumContentIndex].u.tagCFString = text ; + tag.content[kHMMaximumContentIndex].u.tagCFString = m_helpTextRef ; tag.tagSide = kHMDefaultSide; HMDisplayTag( &tag ); } @@ -452,7 +455,10 @@ void wxMacToolTip::Clear() #if TARGET_CARBON HMHideTag() ; if( m_helpTextRef ) - CFRelease( m_helpTextRef ) + { + CFRelease( m_helpTextRef ) ; + m_helpTextRef = NULL ; + } #else if ( m_window == s_ToolTipWindowRef && m_backpict ) {