X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9e29cd0a2896d37d609bfa92216041589b26c931..0d1903dbda864780eec30efdc4e91776bdbfd21b:/src/xrc/xh_animatctrl.cpp diff --git a/src/xrc/xh_animatctrl.cpp b/src/xrc/xh_animatctrl.cpp index 78e53e09d0..aabcb53a7b 100644 --- a/src/xrc/xh_animatctrl.cpp +++ b/src/xrc/xh_animatctrl.cpp @@ -3,7 +3,6 @@ // Purpose: XML resource handler for wxAnimationCtrl // Author: Francesco Montorsi // Created: 2006-10-15 -// RCS-ID: $Id$ // Copyright: (c) 2006 Francesco Montorsi // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -19,6 +18,7 @@ #include "wx/xrc/xh_animatctrl.h" #include "wx/animate.h" +#include "wx/scopedptr.h" IMPLEMENT_DYNAMIC_CLASS(wxAnimationCtrlXmlHandler, wxXmlResourceHandler) @@ -33,11 +33,13 @@ wxObject *wxAnimationCtrlXmlHandler::DoCreateResource() { XRC_MAKE_INSTANCE(ctrl, wxAnimationCtrl) + wxScopedPtr animation(GetAnimation(wxT("animation"))); + ctrl->Create(m_parentAsWindow, GetID(), - GetAnimation(wxT("animation")), + animation ? *animation : wxNullAnimation, GetPosition(), GetSize(), - GetStyle(_T("style"), wxAC_DEFAULT_STYLE), + GetStyle(wxT("style"), wxAC_DEFAULT_STYLE), GetName()); // if no inactive-bitmap has been provided, GetBitmap() will return wxNullBitmap