mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Do not crash is NSSearchPathForDirectoriesInDomain return nil
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9671 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8bba1818e9
commit
7889de51e7
1 changed files with 2 additions and 2 deletions
|
@ -517,7 +517,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
|||
if (env)
|
||||
{
|
||||
NSArray *paths;
|
||||
NSMutableString *system;
|
||||
NSMutableString *system = nil;
|
||||
NSString *str;
|
||||
|
||||
if ((str = [env objectForKey: @"GNUSTEP_TARGET_DIR"]) != nil)
|
||||
|
@ -541,7 +541,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
|||
paths = NSSearchPathForDirectoriesInDomains(GSLibrariesDirectory,
|
||||
NSSystemDomainMask, YES);
|
||||
if ((paths != nil) && ([paths count] > 0))
|
||||
system = RETAIN([paths objectAtIndex: 0]);
|
||||
system = RETAIN([paths objectAtIndex: 0]);
|
||||
|
||||
_executable_path = nil;
|
||||
#ifdef PROCFS_EXE_LINK
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue