diff options
author | Takamichi Horikawa <takamichiho@gmail.com> | 2017-10-29 23:29:59 +0900 |
---|---|---|
committer | Takamichi Horikawa <takamichiho@gmail.com> | 2017-10-29 23:29:59 +0900 |
commit | 8574943784da5ce5e910ddf805423eed93996cad (patch) | |
tree | 6bb257cda171179423d674dc6c582b195a947f82 /gtk | |
parent | b65cc3e0489701198f05acbe7e0c12ff9d06c5fa (diff) |
gtk: fixed crash when hitting F7 before file loaded
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/main.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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) { |