summaryrefslogtreecommitdiffstats
path: root/audio/avdtp.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-05-15 02:51:55 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-05-15 02:51:55 +0000
commit067f966a9b5ed7e8e28b5f2b483fb4650da9de88 (patch)
treed79454e3208e5a38a0061340ad30f16ac56b5cd3 /audio/avdtp.c
parent865f1108806df04d4bc1b81d08756924e5d52d6a (diff)
Fix default value handling when config file is not present
Diffstat (limited to 'audio/avdtp.c')
-rw-r--r--audio/avdtp.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c
index 7290578b..c74c99e0 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -2940,14 +2940,15 @@ int avdtp_init(GKeyFile *config)
if (avdtp_server)
return 0;
- tmp = g_key_file_get_boolean(config, "General", "Master",
- &err);
- if (err) {
- debug("audio.conf: %s", err->message);
- g_error_free(err);
- err = NULL;
- } else
- master = tmp;
+ if (config) {
+ tmp = g_key_file_get_boolean(config, "General",
+ "Master", &err);
+ if (err) {
+ debug("audio.conf: %s", err->message);
+ g_error_free(err);
+ } else
+ master = tmp;
+ }
avdtp_server = avdtp_server_socket(master);
if (!avdtp_server)