[libpeas] [osx] Check for bundle before resource path
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] [osx] Check for bundle before resource path
- Date: Fri, 22 Aug 2014 11:21:19 +0000 (UTC)
commit c44c8baa50482919bc5d753d58faf27b12bc1092
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Fri Aug 22 13:21:11 2014 +0200
[osx] Check for bundle before resource path
libpeas/peas-dirs.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libpeas/peas-dirs.c b/libpeas/peas-dirs.c
index 6dcd0be..23e17e0 100644
--- a/libpeas/peas-dirs.c
+++ b/libpeas/peas-dirs.c
@@ -37,6 +37,13 @@ dirs_os_x_get_bundle_resource_dir (void)
NSString *path;
pool = [[NSAutoreleasePool alloc] init];
+
+ if ([[NSBundle mainBundle] bundleIdentifier] == nil)
+ {
+ [pool release];
+ return NULL;
+ }
+
path = [[NSBundle mainBundle] resourcePath];
if (!path)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]