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 }