b=548434 NULL check aNPP in _invalidaterect for nspluginwrapper r=cjones
authorKarl Tomlinson <karlt+@karlt.net>
Wed, 24 Feb 2010 16:19:51 -0800
changeset 38717 2cc3e6d170ebe56e9dd15d03de16a4ddf6e92f30
parent 38716 c2ed18018054dd89e598d6a3afbf7ca5f1447ce5
child 38718 13d8f6d3b0a90190a47539470c2be4174b010187
push id11819
push userktomlinson@mozilla.com
push dateThu, 25 Feb 2010 23:07:37 +0000
treeherderautoland@13d8f6d3b0a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs548434
milestone1.9.3a2pre
b=548434 NULL check aNPP in _invalidaterect for nspluginwrapper r=cjones
dom/plugins/PluginModuleChild.cpp
--- a/dom/plugins/PluginModuleChild.cpp
+++ b/dom/plugins/PluginModuleChild.cpp
@@ -940,17 +940,20 @@ void NP_CALLBACK
 }
 
 void NP_CALLBACK
 _invalidaterect(NPP aNPP,
                 NPRect* aInvalidRect)
 {
     PLUGIN_LOG_DEBUG_FUNCTION;
     AssertPluginThread();
-    InstCast(aNPP)->InvalidateRect(aInvalidRect);
+    // NULL check for nspluginwrapper (bug 548434)
+    if (aNPP) {
+        InstCast(aNPP)->InvalidateRect(aInvalidRect);
+    }
 }
 
 void NP_CALLBACK
 _invalidateregion(NPP aNPP,
                   NPRegion aInvalidRegion)
 {
     PLUGIN_LOG_DEBUG_FUNCTION;
     AssertPluginThread();