aboutsummaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorTakamichi Horikawa <takamichiho@gmail.com>2017-10-29 23:29:59 +0900
committerTakamichi Horikawa <takamichiho@gmail.com>2017-10-29 23:29:59 +0900
commit8574943784da5ce5e910ddf805423eed93996cad (patch)
tree6bb257cda171179423d674dc6c582b195a947f82 /gtk
parentb65cc3e0489701198f05acbe7e0c12ff9d06c5fa (diff)
gtk: fixed crash when hitting F7 before file loaded
Diffstat (limited to 'gtk')
-rw-r--r--gtk/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk/main.c b/gtk/main.c
index c941896..eafc9b3 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -433,9 +433,11 @@ static gboolean key_press_cb(GtkWidget *w,
}
break;
case GDK_KEY_F7:
- g.sound_paused ^= 1;
- g.work.paused = g.sound_paused;
- g.ss->pause(g.ss, g.sound_paused, 0);
+ if (g.ss) {
+ g.sound_paused ^= 1;
+ g.work.paused = g.sound_paused;
+ g.ss->pause(g.ss, g.sound_paused, 0);
+ }
break;
case GDK_KEY_F11:
if (shift) {