From: Jussi Laako Date: Mon, 20 May 2013 12:37:34 +0000 (+0300) Subject: Just return NULL on NULL copy of SecurityContext X-Git-Tag: upstream/2.4.0^2~103 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddec7be04c7ff397ed6b6ad578a573607259799a;p=platform%2Fupstream%2Flibgsignon-glib.git Just return NULL on NULL copy of SecurityContext --- diff --git a/libsignon-glib/signon-security-context.c b/libsignon-glib/signon-security-context.c index 9efec9b..8985ed4 100644 --- a/libsignon-glib/signon-security-context.c +++ b/libsignon-glib/signon-security-context.c @@ -89,7 +89,8 @@ signon_security_context_new_from_values (const gchar *system_context, SignonSecurityContext * signon_security_context_copy (const SignonSecurityContext *src_ctx) { - g_return_val_if_fail (src_ctx != NULL, NULL); + if (!src_ctx) + return NULL; return signon_security_context_new_from_values (src_ctx->sys_ctx, src_ctx->app_ctx);