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:
Robin Dunn
2003-06-07 03:59:00 +00:00
parent 9ec1cc00f2
commit b7850f8fe4
2 changed files with 26 additions and 18 deletions

View File

@@ -3627,10 +3627,14 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect )
#ifndef __WXGTK20__
if (g_isIdle)
wxapp_install_idle_handler();
wxRect myRect (0, 0, m_wxwindow->allocation.width,
m_wxwindow->allocation.height);
if (rect){
wxRect myRect(0,0,0,0);
if (m_wxwindow)
myRect.SetSize(wxSize( m_wxwindow->allocation.width,
m_wxwindow->allocation.height));
if (rect)
{
myRect.Intersect(*rect);
if (!myRect.width || !myRect.height)
// nothing to do, rectangle is empty

View File

@@ -3627,10 +3627,14 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect )
#ifndef __WXGTK20__
if (g_isIdle)
wxapp_install_idle_handler();
wxRect myRect (0, 0, m_wxwindow->allocation.width,
m_wxwindow->allocation.height);
if (rect){
wxRect myRect(0,0,0,0);
if (m_wxwindow)
myRect.SetSize(wxSize( m_wxwindow->allocation.width,
m_wxwindow->allocation.height));
if (rect)
{
myRect.Intersect(*rect);
if (!myRect.width || !myRect.height)
// nothing to do, rectangle is empty