aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-04-22 08:46:02 -0700
committerScott Jackson <daneren2005@gmail.com>2015-04-22 08:46:02 -0700
commit57ab9de97ef07e6edbff4123e9e0a05ae3681505 (patch)
tree72757673b0007dbe21b28d137a5e9751e8592876
parent7df02047502ae6aff26d90466abdff468c73462a (diff)
downloaddsub-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.java8
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) {