]> khamidou — GitHub mirrors - electron.git/commitdiff
Only cleanup if we are the main process
authorPaul Betts <paul@paulbetts.org>
Wed, 21 Oct 2015 19:29:21 +0000 (12:29 -0700)
committerPaul Betts <paul@paulbetts.org>
Wed, 21 Oct 2015 19:29:21 +0000 (12:29 -0700)
atom/browser/browser.cc

index 6bfeae3c56b1aa9b1f5ae4451c484e3d5e833f87..6d39cdcc8b96fca7d1c0a48e67c46d6537107667 100644 (file)
@@ -149,8 +149,11 @@ void Browser::NotifyAndShutdown() {
   }
 
   if (process_notify_callback_set_) {
-    process_singleton_->Cleanup();
     process_notify_callback_.Reset();
+
+    if (process_notify_result_ == ProcessSingleton::PROCESS_NONE) {
+      process_singleton_->Cleanup();
+    }
   }
 
   Shutdown();