Bug 647600: Restore null checks. r=bsmedberg
authorChris Jones <jones.chris.g@gmail.com>
Wed, 06 Apr 2011 12:28:02 -0500
changeset 67793 4e1710fd488afcf63398a25b288c8154751bfab6
parent 67792 57af1004637a729e035380ea1afb54236cbc7eff
child 67794 4991f1c5c3e03c26d00b97b0a2dbf08685e8dce0
push id19428
push usereakhgari@mozilla.com
push dateSun, 10 Apr 2011 19:11:44 +0000
treeherdermozilla-central@6eaee284fdb9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs647600
milestone2.2a1pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 647600: Restore null checks. r=bsmedberg
modules/plugin/base/src/nsNPAPIPlugin.cpp
--- a/modules/plugin/base/src/nsNPAPIPlugin.cpp
+++ b/modules/plugin/base/src/nsNPAPIPlugin.cpp
@@ -905,22 +905,26 @@ OnShutdown()
     delete sPluginThreadAsyncCallLock;
 
     sPluginThreadAsyncCallLock = nsnull;
   }
 }
 
 AsyncCallbackAutoLock::AsyncCallbackAutoLock()
 {
-  sPluginThreadAsyncCallLock->Lock();
+  if (sPluginThreadAsyncCallLock) {
+    sPluginThreadAsyncCallLock->Lock();
+  }
 }
 
 AsyncCallbackAutoLock::~AsyncCallbackAutoLock()
 {
-  sPluginThreadAsyncCallLock->Unlock();
+  if (sPluginThreadAsyncCallLock) {
+    sPluginThreadAsyncCallLock->Unlock();
+  }
 }
 
 
 NPP NPPStack::sCurrentNPP = nsnull;
 
 const char *
 PeekException()
 {