File tree 1 file changed +7
-1
lines changed
Parse/Internal/Object/Subclassing
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -340,6 +340,12 @@ - (void)_rawRegisterSubclass:(Class)kls {
340
340
341
341
- (void )_registerSubclassesInBundle : (NSBundle *)bundle {
342
342
PFConsistencyAssert (bundle.loaded , @" Cannot register subclasses in a bundle that hasn't been loaded!" );
343
+
344
+ const char *executablePath = bundle.executablePath .UTF8String ;
345
+ if (executablePath == NULL ) {
346
+ return ;
347
+ }
348
+
343
349
dispatch_sync (_registeredSubclassesAccessQueue, ^{
344
350
Class pfObjectClass = [PFObject class ];
345
351
@@ -352,7 +358,7 @@ - (void)_registerSubclassesInBundle:(NSBundle *)bundle {
352
358
// just use a simple array here.
353
359
char potentialPaths[2 ][PATH_MAX] = { };
354
360
355
- strncpy (potentialPaths[0 ], bundle. executablePath . UTF8String , PATH_MAX);
361
+ strncpy (potentialPaths[0 ], executablePath, PATH_MAX);
356
362
realpath (potentialPaths[0 ], potentialPaths[1 ]);
357
363
358
364
const char **classNames = NULL ;
You can’t perform that action at this time.
0 commit comments