Add if-statement to check return value 57/10357/3
authorHoseon LEE <hoseon46.lee@samsung.com>
Thu, 12 Sep 2013 08:20:07 +0000 (17:20 +0900)
committerSoo-Hyun Choi <sh9.choi@samsung.com>
Fri, 13 Sep 2013 09:21:53 +0000 (18:21 +0900)
[Issue#]   Prevent 12049
[Problem]  Unchecked return value
[Cause]    N/A
[Solution] Adding the checking return value.
           If return value is FALSE, print warning log.

Change-Id: I079be8ea2059ff6370e8e0c32c5c0c912d2bc3a5

src/dispatch-event/dispatch_event_support.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index d9b4d2b..7d001a2
@@ -181,7 +181,10 @@ void dispatchHwKeyEvent(Evas_Object* ewkView, const std::string key)
         // just for debugging
         // LogDebug("script :\n" << script.str());
 
-        ewk_view_script_execute(ewkView, script.str().c_str(), NULL, NULL);
+        if (ewk_view_script_execute(ewkView, script.str().c_str(), NULL, NULL) != EINA_TRUE)
+        {
+            LogWarning("ewk_view_script_execute returned FALSE!");
+        }
     }
 }