diff --git a/xpcom/components/nsNativeComponentLoader.cpp b/xpcom/components/nsNativeComponentLoader.cpp index 34548bdb0e0..4572f89b529 100644 --- a/xpcom/components/nsNativeComponentLoader.cpp +++ b/xpcom/components/nsNativeComponentLoader.cpp @@ -201,8 +201,9 @@ nsNativeModuleLoader::LoadModule(nsILocalFile* aFile) } #endif - data.module = *(mozilla::Module const *const *) PR_FindSymbol(data.library, "NSModule"); - if (data.module) { + void *module = PR_FindSymbol(data.library, "NSModule"); + if (module) { + data.module = *(mozilla::Module const *const *) module; if (mLibraries.Put(hashedFile, data)) return data.module; }