X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..6586750c6a4fa9084eaf5075006ca1fcfe50e818:/src/xrc/xh_animatctrl.cpp diff --git a/src/xrc/xh_animatctrl.cpp b/src/xrc/xh_animatctrl.cpp index 6bded88fdc..b912f1b92b 100644 --- a/src/xrc/xh_animatctrl.cpp +++ b/src/xrc/xh_animatctrl.cpp @@ -19,6 +19,7 @@ #include "wx/xrc/xh_animatctrl.h" #include "wx/animate.h" +#include "wx/scopedptr.h" IMPLEMENT_DYNAMIC_CLASS(wxAnimationCtrlXmlHandler, wxXmlResourceHandler) @@ -33,9 +34,11 @@ 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(wxT("style"), wxAC_DEFAULT_STYLE), GetName());