gui/model: Don't add tracks if queue_model is NULL
Otherwise we will crash with a memory error. This only seems to be a problem when Ocarina is started up after creating a user playlist. Fixes #99: Ocarina crashes during startup with user playlists Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
59b2c854e7
commit
01927cf806
|
@ -285,7 +285,7 @@ void gui_queue_model_add(struct queue *queue, unsigned int row)
|
|||
GtkTreePath *path;
|
||||
GtkTreeIter iter;
|
||||
|
||||
if (queue != queue_model->gqm_queue)
|
||||
if (!queue_model || queue != queue_model->gqm_queue)
|
||||
return;
|
||||
|
||||
path = gtk_tree_path_new_from_indices(row, -1);
|
||||
|
|
Loading…
Reference in New Issue