X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/462167a9f7f9bace458054445806dd30c1ba2079..9b49405777342458dc1666001865eef7309b6c30:/src/generic/animateg.cpp diff --git a/src/generic/animateg.cpp b/src/generic/animateg.cpp index a2a50f94be..fe6ee204da 100644 --- a/src/generic/animateg.cpp +++ b/src/generic/animateg.cpp @@ -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(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); }