summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
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",