]> git.saurik.com Git - wxWidgets.git/commitdiff
handle errors returned by wxAnimateCtrl::Play() (part of patch 1586730)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 29 Oct 2006 18:03:31 +0000 (18:03 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 29 Oct 2006 18:03:31 +0000 (18:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/xrc/myframe.cpp

index 546667440cf7b67ac266252b2622e32e872ab6e5..618fe342a4059900f86b0426f614da0a510585a7 100644 (file)
@@ -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
 }