From: Vadim Zeitlin Date: Thu, 20 Nov 2008 18:30:50 +0000 (+0000) Subject: don't test sei.hInstApp in DoLaunchDefaultBrowser(), just look at ShellExecuteEx... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2190f6aa153416d1c225532bb026df98b3e273ad?ds=inline don't test sei.hInstApp in DoLaunchDefaultBrowser(), just look at ShellExecuteEx() return value (#10190) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index a498ce07e6..05bb209f57 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -1077,21 +1077,8 @@ static bool DoLaunchDefaultBrowser(const wxString& urlOrig, int flags) sei.nShow = SW_SHOWNORMAL; sei.fMask = SEE_MASK_FLAG_NO_UI; // we give error message ourselves - ::ShellExecuteEx(&sei); - - const INT_PTR nResult = (INT_PTR)sei.hInstApp; - - // Firefox returns file not found for some reason, so make an exception - // for it - if ( nResult > 32 || nResult == SE_ERR_FNF ) - { -#ifdef __WXDEBUG__ - // Log something if SE_ERR_FNF happens - if ( nResult == SE_ERR_FNF ) - wxLogDebug(wxT("SE_ERR_FNF from ShellExecute -- maybe FireFox?")); -#endif // __WXDEBUG__ + if ( ::ShellExecuteEx(&sei) ) return true; - } #elif defined(__WXCOCOA__) // NOTE: We need to call the real implementation from src/cocoa/utils.mm // because the code must use Objective-C features.