Bug 496891. Handle NSGetModule returning null. r=bzbarsky

This commit is contained in:
arno renevier 2009-06-11 13:16:21 -04:00
parent ecd783a395
commit 7ba51c715c

View File

@ -777,7 +777,8 @@ mozJSComponentLoader::LoadModule(nsILocalFile* aComponentFile,
#endif
JSObject *jsModuleObj;
if (!JS_ValueToObject(cx, retval, &jsModuleObj)) {
if (!JS_ValueToObject(cx, retval, &jsModuleObj) ||
!jsModuleObj) {
/* XXX report error properly */
return NS_ERROR_FAILURE;
}