diff --git a/mozilla/modules/plugin/src/npglue.cpp b/mozilla/modules/plugin/src/npglue.cpp index 28e3760b1b6..b07da97e09b 100644 --- a/mozilla/modules/plugin/src/npglue.cpp +++ b/mozilla/modules/plugin/src/npglue.cpp @@ -4012,6 +4012,12 @@ NPL_Shutdown() instance=instance->next; np_delete_instance(di); } + + /* beard: since we initialize refs to 1, we have to reduce it to zero here. */ + if (dh->refs > 0) { + dh->refs--; + np_UnloadPluginClass(dh); + } } }