OSDN Git Service

Merge "Fix race condition clearing VSYNC enable on VrFlinger startup." into oc-dr1-dev
[android-x86/frameworks-native.git] / libs / vr / libvrflinger / hardware_composer.cpp
index 4479d1e..11c1370 100644 (file)
@@ -821,8 +821,9 @@ void HardwareComposer::PostThread() {
       std::unique_lock<std::mutex> lock(post_thread_mutex_);
       ALOGI("HardwareComposer::PostThread: Entering quiescent state.");
 
-      // Tear down resources.
-      OnPostThreadPaused();
+      // Tear down resources if necessary.
+      if (was_running)
+        OnPostThreadPaused();
 
       was_running = false;
       post_thread_resumed_ = false;