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:
Ryan Norton
2005-03-09 18:53:45 +00:00
parent bb154f79f3
commit 099c3b27c2

View File

@@ -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)