summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-02-19 16:42:44 +0000
committerThomas Martitz <kugel@rockbox.org>2011-02-19 16:42:44 +0000
commitd6ce7fe3d4b5fbc2a49207112fe4e88627aa9af4 (patch)
treeb981a55d5de0bc09e685042de759ca6d00dfd58f /apps
parent171b4ff807e098f76a70736426e2dca917d808c3 (diff)
downloadrockbox-d6ce7fe3d4b5fbc2a49207112fe4e88627aa9af4.tar.gz
rockbox-d6ce7fe3d4b5fbc2a49207112fe4e88627aa9af4.tar.bz2
rockbox-d6ce7fe3d4b5fbc2a49207112fe4e88627aa9af4.zip
Android: Fix some race conditions and crashes on startup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29341 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/hosted/notification.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/hosted/notification.c b/apps/hosted/notification.c
index fa8c286808..4dd1bece3d 100644
--- a/apps/hosted/notification.c
+++ b/apps/hosted/notification.c
@@ -83,6 +83,11 @@ void notification_init(void)
"fg_runner", "Lorg/rockbox/Helper/RunForegroundManager;");
NotificationManager_instance = e->GetObjectField(env_ptr,
RockboxService_instance, nNM);
+ if (NotificationManager_instance == NULL)
+ {
+ DEBUGF("Failed to get RunForegroundManager instance. Performance will be bad");
+ return;
+ }
jclass class = e->GetObjectClass(env_ptr, NotificationManager_instance);
updateNotification = e->GetMethodID(env_ptr, class, "updateNotification",