X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=server%2FServerGDBus.cpp;h=1f60e1ee4ce0e3a46179820b5481a3b62fc82623;hb=2d7e06a991f6d03ab2229e85185cd7f0090dc739;hp=7409a1982eafc968f1d8ca2e9fc430d8fae99bb1;hpb=23c2f59d80573fac07c29b81dae0f11cc650ab3c;p=platform%2Fcore%2Fconnectivity%2Fsmartcard-service.git diff --git a/server/ServerGDBus.cpp b/server/ServerGDBus.cpp index 7409a19..1f60e1e 100644 --- a/server/ServerGDBus.cpp +++ b/server/ServerGDBus.cpp @@ -133,6 +133,11 @@ namespace smartcard_service_api const gchar *name, const gchar *old_owner, const gchar *new_owner, void *user_data) { + if (name == NULL || old_owner == NULL || new_owner == NULL) { + _ERR("invalid parameter"); + return; + } + if (strlen(new_owner) == 0) { ClientInstance *client; @@ -363,9 +368,12 @@ namespace smartcard_service_api resource.createClient(name, pid); instance = resource.getClient(name); - - /* generate certification hashes */ - instance->generateCertificationHashes(); + if (instance != NULL) { + /* generate certification hashes */ + instance->generateCertificationHashes(); + } else { + _ERR("createClient failed"); + } } if (instance != NULL) {