From 099c3b27c229312ffc82ea185e3f3e8884f6c3db Mon Sep 17 00:00:00 2001 From: Ryan Norton Date: Wed, 9 Mar 2005 18:53:45 +0000 Subject: [PATCH] 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 --- src/mac/carbon/mediactrl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mac/carbon/mediactrl.cpp b/src/mac/carbon/mediactrl.cpp index 5b6aef7f1f..d41c30cf9b 100644 --- a/src/mac/carbon/mediactrl.cpp +++ b/src/mac/carbon/mediactrl.cpp @@ -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) -- 2.50.0