diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-01-31 13:59:06 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-01-31 13:59:06 -0800 |
commit | 26ab449aa0a619c5398d80cc6ac616f28647039d (patch) | |
tree | 30efa289d5b6f00077bbc8632e8df083f4ec90c4 /src | |
parent | 34c491447a9ffcea935efdc90eaaae2685415ac7 (diff) | |
download | dsub-26ab449aa0a619c5398d80cc6ac616f28647039d.tar.gz dsub-26ab449aa0a619c5398d80cc6ac616f28647039d.tar.bz2 dsub-26ab449aa0a619c5398d80cc6ac616f28647039d.zip |
Fix crash if cancel reason or response is null
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/service/DLNAController.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/github/daneren2005/dsub/service/DLNAController.java b/src/github/daneren2005/dsub/service/DLNAController.java index 6a620542..cdff990b 100644 --- a/src/github/daneren2005/dsub/service/DLNAController.java +++ b/src/github/daneren2005/dsub/service/DLNAController.java @@ -124,9 +124,13 @@ public class DLNAController extends RemoteController { @Override
protected void ended(GENASubscription genaSubscription, CancelReason cancelReason, UpnpResponse upnpResponse) {
Log.i(TAG, "Ended subscription");
- Log.i(TAG, "Cancel Reason: " + cancelReason.toString());
- Log.i(TAG, "Reponse Message: " + upnpResponse.getStatusMessage());
- Log.i(TAG, "Response Details: " + upnpResponse.getResponseDetails());
+ if(cancelReason != null) {
+ Log.i(TAG, "Cancel Reason: " + cancelReason.toString());
+ }
+ if(upnpResponse != null) {
+ Log.i(TAG, "Reponse Message: " + upnpResponse.getStatusMessage());
+ Log.i(TAG, "Response Details: " + upnpResponse.getResponseDetails());
+ }
}
@Override
|