From 4c1a2a51ef91d8f37951c7642c4b2b984623feed Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 14 Sep 2014 23:58:14 +0000 Subject: [PATCH] Don't crash under XP in the taskbar button sample. Refuse to run if the taskbar button API is not available. This wouldn't make much sense anyhow and is the simplest thing to do. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/taskbarbutton/taskbarbutton.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/samples/taskbarbutton/taskbarbutton.cpp b/samples/taskbarbutton/taskbarbutton.cpp index 832f1cdbd7..fdcc252f67 100644 --- a/samples/taskbarbutton/taskbarbutton.cpp +++ b/samples/taskbarbutton/taskbarbutton.cpp @@ -193,6 +193,12 @@ bool MyApp::OnInit() } MyFrame *frame = new MyFrame("wxTaskBarButton App"); + if ( !frame->MSWGetTaskBarButton() ) + { + wxLogError("Task bar button API is not available on this system, sorry."); + return false; + } + frame->Show(true); return true;