From 38344acb662e2d35b7c10f89626e3b4c4b399281 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 11 Jul 2023 15:13:23 -0400 Subject: [PATCH] MT#56128 add missing NULL checks Silence warnings from Glib Change-Id: I687ff4ad69da3a8782f686ed26399ffd45612357 --- daemon/sdp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/sdp.c b/daemon/sdp.c index ea80ee101..3107741d4 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -331,7 +331,7 @@ static int sdp_manipulate_check(enum command_type command_type, ht = sdp_manipulations->subst_commands_glob; } - str * l = g_hash_table_lookup(ht, attr_name); + str * l = ht ? g_hash_table_lookup(ht, attr_name) : NULL; if (l) return 1; break; @@ -428,7 +428,7 @@ static void sdp_manipulations_subst(struct sdp_chopper *chop, ht = sdp_manipulations->subst_commands_glob; } - str * cmd_subst_value = g_hash_table_lookup(ht, attr_name); + str * cmd_subst_value = ht ? g_hash_table_lookup(ht, attr_name) : NULL; if (!cmd_subst_value) return;