From 67b8124a1d34c2fa850005317503663407b9648e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 22 Nov 2013 00:02:17 +0100 Subject: Mapper: _get_music_directory_utf8() may return nullptr If no music_directory is configured, return nullptr instead of an empty string. This fixes a crash when db_file is configured without music_directory. --- src/Mapper.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Mapper.hxx') diff --git a/src/Mapper.hxx b/src/Mapper.hxx index be69a7110..947fd2822 100644 --- a/src/Mapper.hxx +++ b/src/Mapper.hxx @@ -41,7 +41,8 @@ mapper_init(AllocatedPath &&music_dir, AllocatedPath &&playlist_dir); void mapper_finish(void); /** - * Return the absolute path of the music directory encoded in UTF-8. + * Return the absolute path of the music directory encoded in UTF-8 or + * nullptr if no music directory was configured. */ gcc_const const char * -- cgit v1.2.3