diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-01-30 16:43:03 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-01-30 16:43:03 +0100 |
commit | 7256360a178457835fc81f59e7e63a6327995574 (patch) | |
tree | e99c3f30c367792c377264ed272db9bb9efbfa2c | |
parent | 40f1ef5400c58921163585860d5fbde433956f42 (diff) |
get_contact_status: don't unref NULL hash table
make_presence_opt_args() can return NULL, tp_presence_status_new() is
NULL-safe but g_hash_table_unref() is not.
-rw-r--r-- | src/connection.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/connection.c b/src/connection.c index c4ba3be7..582ecff0 100644 --- a/src/connection.c +++ b/src/connection.c @@ -609,7 +609,8 @@ get_contact_status (GObject *obj, optional_arguments = make_presence_opt_args (presence, message); ps = tp_presence_status_new (presence, optional_arguments); - g_hash_table_unref (optional_arguments); + if (optional_arguments != NULL) + g_hash_table_unref (optional_arguments); return ps; } |