mirror of git://git.sysmocom.de/ofono
atutil: guard call to g_hash_table_destroy()
Glib emits a warning when g_hash_table_destroy() is called on a NULL pointer: GLib-CRITICAL **: 13:27:40.269: g_hash_table_destroy: assertion 'hash_table != NULL' failed Add a check to avoid this warning.
This commit is contained in:
parent
7f065625ca
commit
181e8d3da7
|
@ -769,7 +769,9 @@ GAtChat *at_util_open_device(struct ofono_modem *modem, const char *key,
|
|||
}
|
||||
|
||||
channel = g_at_tty_open(device, options);
|
||||
g_hash_table_destroy(options);
|
||||
|
||||
if (options)
|
||||
g_hash_table_destroy(options);
|
||||
|
||||
if (channel == NULL)
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue