X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/26564cf29d6fe52e5f993381a662e47271674d0c..ba5787676d002f76b4c3944cb598b626f10f058d:/src/generic/animateg.cpp diff --git a/src/generic/animateg.cpp b/src/generic/animateg.cpp index c957313fad..a2bb840349 100644 --- a/src/generic/animateg.cpp +++ b/src/generic/animateg.cpp @@ -147,10 +147,6 @@ bool wxAnimation::Load(wxInputStream &stream, wxAnimationType type) handler = FindHandler(type); - // do a copy of the handler from the static list which we will own - // as our reference data - m_refData = handler->Clone(); - if (handler == NULL) { wxLogWarning( _("No animation handler for type %ld defined."), type ); @@ -158,6 +154,11 @@ bool wxAnimation::Load(wxInputStream &stream, wxAnimationType type) return false; } + + // do a copy of the handler from the static list which we will own + // as our reference data + m_refData = handler->Clone(); + if (stream.IsSeekable() && !M_ANIMDATA->CanRead(stream)) { wxLogError(_("Animation file is not of type %ld."), type);