From: JongHeon Choi Date: Tue, 14 Jun 2016 07:12:42 +0000 (+0900) Subject: Fixed svace. (84670 - DEREF_OF_NULL.RET.PROC.STAT) X-Git-Tag: accepted/tizen/common/20160617.121138~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f40b4fc7eb443cf6ec64e8ccf1f654d5189670c;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Fixed svace. (84670 - DEREF_OF_NULL.RET.PROC.STAT) --- diff --git a/extensions/renderer/xwalk_module_system.cc b/extensions/renderer/xwalk_module_system.cc index 43d9630..b14f12c 100644 --- a/extensions/renderer/xwalk_module_system.cc +++ b/extensions/renderer/xwalk_module_system.cc @@ -38,6 +38,7 @@ void RequireNativeCallback(const v8::FunctionCallbackInfo& info) { if (module_system_value.IsEmpty() || module_system_value->IsUndefined()) { LOGGER(ERROR) << "Trying to use requireNative from already " << "destroyed module system!"; + result.SetUndefined(); return; } @@ -49,6 +50,10 @@ void RequireNativeCallback(const v8::FunctionCallbackInfo& info) { result.SetUndefined(); return; } + if (!module_system) { + result.SetUndefined(); + return; + } v8::Handle object = module_system->RequireNative(*v8::String::Utf8Value(info[0])); if (object.IsEmpty()) {