From 863d562dfcfbdd2dffb8a5ef929f4372a92c5fda Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 29 Oct 2006 18:03:31 +0000 Subject: [PATCH] handle errors returned by wxAnimateCtrl::Play() (part of patch 1586730) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/xrc/myframe.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/xrc/myframe.cpp b/samples/xrc/myframe.cpp index 546667440c..618fe342a4 100644 --- a/samples/xrc/myframe.cpp +++ b/samples/xrc/myframe.cpp @@ -194,8 +194,10 @@ void MyFrame::OnAnimationCtrlPlay(wxCommandEvent& event) } else { - ctrl->Play(); - btn->SetLabel(wxT("Stop")); + if (ctrl->Play()) + btn->SetLabel(wxT("Stop")); + else + wxLogError(wxT("Cannot play the animation...")); } #endif } -- 2.47.2