Fix svace issue 12/252512/1 accepted/tizen/unified/20210210.052239 submit/tizen/20210209.074903
authorYunmi Ha <yunmi.ha@samsung.com>
Fri, 29 Jan 2021 05:23:18 +0000 (14:23 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Fri, 29 Jan 2021 05:23:18 +0000 (14:23 +0900)
- add null checking logic

Change-Id: I9e9c77b91799b674133daafbe770908c17952c23
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
src/runtime_info_usage.c

index 64120d2..19f6320 100644 (file)
@@ -172,7 +172,7 @@ static GVariant *runtime_info_dbus_request_usage_info(runtime_info_usage_type_e
                //LCOV_EXCL_START : system error
                _E("DBUS_METHOD_CALL: not able to send message : %s",
                                err && err->message ? err->message : NULL);
-               if (err->code == G_FILE_ERROR_TXTBSY)
+               if (err && (err->code == G_FILE_ERROR_TXTBSY))
                        *error = RUNTIME_INFO_ERROR_PERMISSION_DENIED;
                else
                        *error = RUNTIME_INFO_ERROR_REMOTE_IO;