Don't pass empty string to wxFileNameFSSpec or you get a crash
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -298,6 +298,12 @@ bool wxQTMediaBackend::Load(const wxString& fileName)
|
||||
short movieResFile;
|
||||
FSSpec sfFile;
|
||||
|
||||
//FIXME:wxMacFilename2FSSpec crashes on empty string -
|
||||
//does it crash on other strings too and should this
|
||||
//"fix" be put in the carbon wxSound?
|
||||
if (fileName.empty())
|
||||
return false;
|
||||
|
||||
wxMacFilename2FSSpec( fileName , &sfFile );
|
||||
|
||||
if (OpenMovieFile (&sfFile, &movieResFile, fsRdPerm) != noErr)
|
||||
|
Reference in New Issue
Block a user