Fix for new refresh code. (It's possible for m_wxwidnow to be NULL.)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3627,15 +3627,19 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect )
|
|||||||
#ifndef __WXGTK20__
|
#ifndef __WXGTK20__
|
||||||
if (g_isIdle)
|
if (g_isIdle)
|
||||||
wxapp_install_idle_handler();
|
wxapp_install_idle_handler();
|
||||||
wxRect myRect (0, 0, m_wxwindow->allocation.width,
|
|
||||||
m_wxwindow->allocation.height);
|
wxRect myRect(0,0,0,0);
|
||||||
|
if (m_wxwindow)
|
||||||
if (rect){
|
myRect.SetSize(wxSize( m_wxwindow->allocation.width,
|
||||||
myRect.Intersect(*rect);
|
m_wxwindow->allocation.height));
|
||||||
if (!myRect.width || !myRect.height)
|
|
||||||
// nothing to do, rectangle is empty
|
if (rect)
|
||||||
return;
|
{
|
||||||
rect = &myRect;
|
myRect.Intersect(*rect);
|
||||||
|
if (!myRect.width || !myRect.height)
|
||||||
|
// nothing to do, rectangle is empty
|
||||||
|
return;
|
||||||
|
rect = &myRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eraseBackground && m_wxwindow && m_wxwindow->window)
|
if (eraseBackground && m_wxwindow && m_wxwindow->window)
|
||||||
|
@@ -3627,15 +3627,19 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect )
|
|||||||
#ifndef __WXGTK20__
|
#ifndef __WXGTK20__
|
||||||
if (g_isIdle)
|
if (g_isIdle)
|
||||||
wxapp_install_idle_handler();
|
wxapp_install_idle_handler();
|
||||||
wxRect myRect (0, 0, m_wxwindow->allocation.width,
|
|
||||||
m_wxwindow->allocation.height);
|
wxRect myRect(0,0,0,0);
|
||||||
|
if (m_wxwindow)
|
||||||
if (rect){
|
myRect.SetSize(wxSize( m_wxwindow->allocation.width,
|
||||||
myRect.Intersect(*rect);
|
m_wxwindow->allocation.height));
|
||||||
if (!myRect.width || !myRect.height)
|
|
||||||
// nothing to do, rectangle is empty
|
if (rect)
|
||||||
return;
|
{
|
||||||
rect = &myRect;
|
myRect.Intersect(*rect);
|
||||||
|
if (!myRect.width || !myRect.height)
|
||||||
|
// nothing to do, rectangle is empty
|
||||||
|
return;
|
||||||
|
rect = &myRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eraseBackground && m_wxwindow && m_wxwindow->window)
|
if (eraseBackground && m_wxwindow && m_wxwindow->window)
|
||||||
|
Reference in New Issue
Block a user