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
This commit is contained in:
parent
9c39f4f538
commit
2190f6aa15
@ -1077,21 +1077,8 @@ static bool DoLaunchDefaultBrowser(const wxString& urlOrig, int flags)
|
|||||||
sei.nShow = SW_SHOWNORMAL;
|
sei.nShow = SW_SHOWNORMAL;
|
||||||
sei.fMask = SEE_MASK_FLAG_NO_UI; // we give error message ourselves
|
sei.fMask = SEE_MASK_FLAG_NO_UI; // we give error message ourselves
|
||||||
|
|
||||||
::ShellExecuteEx(&sei);
|
if ( ::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__
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
#elif defined(__WXCOCOA__)
|
#elif defined(__WXCOCOA__)
|
||||||
// NOTE: We need to call the real implementation from src/cocoa/utils.mm
|
// NOTE: We need to call the real implementation from src/cocoa/utils.mm
|
||||||
// because the code must use Objective-C features.
|
// because the code must use Objective-C features.
|
||||||
|
Loading…
Reference in New Issue
Block a user