Implement koto_utils_is_valid_string to replace repetitive NULL and g_strcmp0 code.
Reduce usage of g_return_if_fail since it results in unnecessary warnings.
This commit is contained in:
parent
0aafa68a35
commit
b4ffba62c7
17 changed files with 121 additions and 65 deletions
|
@ -21,6 +21,7 @@
|
|||
#include "../../indexer/structs.h"
|
||||
#include "koto-button.h"
|
||||
#include "koto-config.h"
|
||||
#include "../../koto-utils.h"
|
||||
#include "music-local.h"
|
||||
|
||||
extern KotoCartographer *koto_maps;
|
||||
|
@ -166,7 +167,7 @@ void koto_page_music_local_go_to_artist_by_uuid(KotoPageMusicLocal *self, gchar
|
|||
NULL
|
||||
);
|
||||
|
||||
if (artist_name == NULL || (g_strcmp0(artist_name, "") == 0)) { // Failed to get the artist name
|
||||
if (!koto_utils_is_string_valid(artist_name)) { // Failed to get the artist name
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue