mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +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
6abec05072
commit
9e8bb6adda
1 changed files with 2 additions and 2 deletions
|
@ -517,7 +517,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
||||||
if (env)
|
if (env)
|
||||||
{
|
{
|
||||||
NSArray *paths;
|
NSArray *paths;
|
||||||
NSMutableString *system;
|
NSMutableString *system = nil;
|
||||||
NSString *str;
|
NSString *str;
|
||||||
|
|
||||||
if ((str = [env objectForKey: @"GNUSTEP_TARGET_DIR"]) != nil)
|
if ((str = [env objectForKey: @"GNUSTEP_TARGET_DIR"]) != nil)
|
||||||
|
@ -541,7 +541,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
||||||
paths = NSSearchPathForDirectoriesInDomains(GSLibrariesDirectory,
|
paths = NSSearchPathForDirectoriesInDomains(GSLibrariesDirectory,
|
||||||
NSSystemDomainMask, YES);
|
NSSystemDomainMask, YES);
|
||||||
if ((paths != nil) && ([paths count] > 0))
|
if ((paths != nil) && ([paths count] > 0))
|
||||||
system = RETAIN([paths objectAtIndex: 0]);
|
system = RETAIN([paths objectAtIndex: 0]);
|
||||||
|
|
||||||
_executable_path = nil;
|
_executable_path = nil;
|
||||||
#ifdef PROCFS_EXE_LINK
|
#ifdef PROCFS_EXE_LINK
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue