summaryrefslogtreecommitdiff
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.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)
83 "fg_runner", "Lorg/rockbox/Helper/RunForegroundManager;"); 83 "fg_runner", "Lorg/rockbox/Helper/RunForegroundManager;");
84 NotificationManager_instance = e->GetObjectField(env_ptr, 84 NotificationManager_instance = e->GetObjectField(env_ptr,
85 RockboxService_instance, nNM); 85 RockboxService_instance, nNM);
86 if (NotificationManager_instance == NULL)
87 {
88 DEBUGF("Failed to get RunForegroundManager instance. Performance will be bad");
89 return;
90 }
86 91
87 jclass class = e->GetObjectClass(env_ptr, NotificationManager_instance); 92 jclass class = e->GetObjectClass(env_ptr, NotificationManager_instance);
88 updateNotification = e->GetMethodID(env_ptr, class, "updateNotification", 93 updateNotification = e->GetMethodID(env_ptr, class, "updateNotification",