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
|
@ -20,6 +20,7 @@
|
|||
#include "../../db/cartographer.h"
|
||||
#include "../../indexer/structs.h"
|
||||
#include "../../koto-track-item.h"
|
||||
#include "../../koto-utils.h"
|
||||
#include "disc-view.h"
|
||||
|
||||
extern KotoActionBar *action_bar;
|
||||
|
@ -156,7 +157,7 @@ void koto_disc_view_handle_selected_rows_changed(GtkListBox *box, gpointer user_
|
|||
|
||||
gchar *album_uuid = koto_indexed_album_get_album_uuid(self->album); // Get the UUID
|
||||
|
||||
if ((album_uuid == NULL) || g_strcmp0(album_uuid, "") == 0) { // Not set
|
||||
if (!koto_utils_is_string_valid(album_uuid)) { // Not set
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue