OSDN Git Service

Fix shutdown if HDCP was never instantiated.
authorAndreas Huber <andih@google.com>
Fri, 28 Sep 2012 22:13:18 +0000 (15:13 -0700)
committerAndreas Huber <andih@google.com>
Fri, 28 Sep 2012 22:13:51 +0000 (15:13 -0700)
Change-Id: Icdf6785880180f417c5432dff54c7e0fb12ef84d
related-to-bug: 7247918

media/libstagefright/wifi-display/source/WifiDisplaySource.cpp

index 8091cc4..d5ffc65 100644 (file)
@@ -1140,9 +1140,11 @@ void WifiDisplaySource::finishStop2() {
     ALOGV("finishStop2");
 
 #if REQUIRE_HDCP
-    mHDCP->setObserver(NULL);
-    mHDCPObserver.clear();
-    mHDCP.clear();
+    if (mHDCP != NULL) {
+        mHDCP->setObserver(NULL);
+        mHDCPObserver.clear();
+        mHDCP.clear();
+    }
 #endif
 
     if (mSessionID != 0) {