]> git.saurik.com Git - wxWidgets.git/commitdiff
When used from wxHtmlListBox it's possible for GetWindow to return NULL.
authorRobin Dunn <robin@alldunn.com>
Thu, 20 Nov 2003 23:12:50 +0000 (23:12 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 20 Nov 2003 23:12:50 +0000 (23:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/winpars.cpp

index 2e6fb654e792ccb9d73340262c9b6dffd005f7bf..b2d0137a7496bf1685dd7dd9ba08203f7ca91ded 100644 (file)
@@ -188,7 +188,7 @@ void wxHtmlWinParser::InitParser(const wxString& source)
 
     m_Container->InsertCell(new wxHtmlColourCell(m_ActualColor));
     m_Container->InsertCell(
-            new wxHtmlColourCell(GetWindow()->GetBackgroundColour(),
+            new wxHtmlColourCell(GetWindow() ? GetWindow()->GetBackgroundColour() : *wxWHITE,
                                  wxHTML_CLR_BACKGROUND));
     m_Container->InsertCell(new wxHtmlFontCell(CreateCurrentFont()));
 }