]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/animateg.cpp
no real change; just add the standard separator where it's missing
[wxWidgets.git] / src / generic / animateg.cpp
index a2a50f94be6e9a1146bd51cb50d1f85eb0dbe566..fe6ee204da04cf05e501fae14d60e3ce07b5ce4a 100644 (file)
@@ -42,7 +42,7 @@ wxAnimationDecoderList wxAnimation::sm_handlers;
 // ----------------------------------------------------------------------------
 
 IMPLEMENT_DYNAMIC_CLASS(wxAnimation, wxAnimationBase)
-#define M_ANIMDATA      wx_static_cast(wxAnimationDecoder*, m_refData)
+#define M_ANIMDATA      static_cast<wxAnimationDecoder*>(m_refData)
 
 wxSize wxAnimation::GetSize() const
 {
@@ -138,7 +138,6 @@ bool wxAnimation::Load(wxInputStream &stream, wxAnimationType type)
                 m_refData = handler->Clone();
                 return M_ANIMDATA->Load(stream);
             }
-
         }
 
         wxLogWarning( _("No handler found for animation type.") );
@@ -309,6 +308,8 @@ wxAnimationCtrl::~wxAnimationCtrl()
 bool wxAnimationCtrl::LoadFile(const wxString& filename, wxAnimationType type)
 {
     wxFileInputStream fis(filename);
+    if (!fis.Ok())
+        return false;
     return Load(fis, type);
 }