diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-04-22 08:46:02 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-04-22 08:46:02 -0700 |
commit | 57ab9de97ef07e6edbff4123e9e0a05ae3681505 (patch) | |
tree | 72757673b0007dbe21b28d137a5e9751e8592876 | |
parent | 7df02047502ae6aff26d90466abdff468c73462a (diff) | |
download | dsub-57ab9de97ef07e6edbff4123e9e0a05ae3681505.tar.gz dsub-57ab9de97ef07e6edbff4123e9e0a05ae3681505.tar.bz2 dsub-57ab9de97ef07e6edbff4123e9e0a05ae3681505.zip |
Fix crash if system unregisters route before creation
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadService.java | 8 |
1 files changed, 6 insertions, 2 deletions
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) { |