From a082ec52518b9147fdd837e25721680feacbc226 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 16 Oct 2011 04:01:01 +0200 Subject: [PATCH] Fix segfault. --- ssnes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssnes.c b/ssnes.c index 57a5952fc5..198893abe7 100644 --- a/ssnes.c +++ b/ssnes.c @@ -1338,7 +1338,7 @@ static void check_input_rate(void) static inline void flush_rewind_audio(void) { - if (g_extern.frame_is_reverse) // We just rewound. Flush rewind audio buffer. + if (g_extern.frame_is_reverse && g_extern.audio_active) // We just rewound. Flush rewind audio buffer. { g_extern.audio_active = audio_flush(g_extern.audio_data.rewind_buf + g_extern.audio_data.rewind_ptr, g_extern.audio_data.rewind_size - g_extern.audio_data.rewind_ptr);