gui/queue: Check for gq_queue before dereferencing it
Otherwise Ocarina will crash. Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
20f10c163d
commit
1d02024505
|
@ -54,7 +54,7 @@ void __queue_random(GtkToggleButton *button, gpointer data)
|
||||||
__queue_toggle_flag(gtk_toggle_button_get_active(button),
|
__queue_toggle_flag(gtk_toggle_button_get_active(button),
|
||||||
gtk_button_get_image(GTK_BUTTON(button)),
|
gtk_button_get_image(GTK_BUTTON(button)),
|
||||||
Q_RANDOM);
|
Q_RANDOM);
|
||||||
if (gq_queue->gq_playlist) {
|
if (gq_queue && gq_queue->gq_playlist) {
|
||||||
playlist_set_random(gq_queue->gq_playlist->pl_type,
|
playlist_set_random(gq_queue->gq_playlist->pl_type,
|
||||||
gq_queue->gq_playlist->pl_name,
|
gq_queue->gq_playlist->pl_name,
|
||||||
gtk_toggle_button_get_active(button));
|
gtk_toggle_button_get_active(button));
|
||||||
|
|
Loading…
Reference in New Issue