From 67804ee6d6d8d6c5d66cd9ab79346dfa56a6ffdf Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Thu, 29 Dec 2011 00:03:28 +0000 Subject: Fail in PcsxrPlugin initialization if we can't find the plugin specified. Prevents a crash if a plug-in was removed/renamed. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@73846 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/PcsxrPlugin.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/macosx/PcsxrPlugin.m b/macosx/PcsxrPlugin.m index d0b712de..2d5e99ce 100644 --- a/macosx/PcsxrPlugin.m +++ b/macosx/PcsxrPlugin.m @@ -120,6 +120,12 @@ } } } + + if (goodPath == nil) { + [self autorelease]; + return nil; + } + pluginRef = SysLoadLibrary([goodPath fileSystemRepresentation]); if (pluginRef == nil) { [self release]; -- cgit v1.2.3