From 57ab9de97ef07e6edbff4123e9e0a05ae3681505 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 22 Apr 2015 08:46:02 -0700 Subject: Fix crash if system unregisters route before creation --- src/github/daneren2005/dsub/service/DownloadService.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java index c953823b..3f1c022c 100644 --- a/src/github/daneren2005/dsub/service/DownloadService.java +++ b/src/github/daneren2005/dsub/service/DownloadService.java @@ -1519,10 +1519,14 @@ public class DownloadService extends Service { } public void registerRoute(MediaRouter router) { - mRemoteControl.registerRoute(router); + if(mRemoteControl != null) { + mRemoteControl.registerRoute(router); + } } public void unregisterRoute(MediaRouter router) { - mRemoteControl.unregisterRoute(router); + if(mRemoteControl != null) { + mRemoteControl.unregisterRoute(router); + } } public void updateRemoteVolume(boolean up) { -- cgit v1.2.3