]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/image.cpp
added a check which should prevent the crash of bug 555111
[wxWidgets.git] / src / common / image.cpp
index d4f9ddac8cfe2a6020b03bf03dd412a70d28c4e8..a18a4473bbadb1317138c7f618252d5425baec56 100644 (file)
@@ -131,6 +131,7 @@ wxImage::wxImage( wxInputStream& stream, const wxString& mimetype, int index )
 #endif // wxUSE_STREAMS
 
 wxImage::wxImage( const wxImage& image )
+    : wxObject()
 {
     Ref(image);
 }
@@ -1014,7 +1015,7 @@ int wxImage::GetImageCount( const wxString &name, long type )
 
 bool wxImage::CanRead( wxInputStream &stream )
 {
-    wxList &list=GetHandlers();
+    const wxList& list = GetHandlers();
 
     for ( wxList::Node *node = list.GetFirst(); node; node = node->GetNext() )
     {