guarding against invalid files passed to 'pdoc' apple event, see #14384

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2012-07-02 11:50:54 +00:00
parent 0161592b25
commit 9c841f8485

View File

@@ -233,9 +233,13 @@ short wxApp::MacHandleAEPDoc(const WXEVENTREF event , WXEVENTREF WXUNUSED(reply)
for (i = 1; i <= itemsInList; i++)
{
AEGetNthPtr(
err = AEGetNthPtr(
&docList, i, typeFSRef, &keywd, &returnedType,
(Ptr)&theRef, sizeof(theRef), &actualSize);
if ( err != noErr)
return err;
fName = wxMacFSRefToPath( &theRef ) ;
MacPrintFile(fName);