If get_setting is called before set_setting, mp->settings would be
NULL resulting in GLib assertion. Hashmap is now allocated in
media_player_create instead of on-demand allocation in set_setting.
external/bluetooth/bluez/audio/media.c:get_setting() Equalizer
CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed
DBG("%s=%s", key, value);
- if (!mp->settings)
- mp->settings = g_hash_table_new(g_direct_hash, g_direct_equal);
-
g_hash_table_replace(mp->settings, GUINT_TO_POINTER(attr),
GUINT_TO_POINTER(val));
return NULL;
}
+ mp->settings = g_hash_table_new(g_direct_hash, g_direct_equal);
+
adapter->players = g_slist_append(adapter->players, mp);
info("Player registered: sender=%s path=%s", sender, path);