|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-25 03:49:40
|
Module: performous
Branch: master
Commit: 022990a4f52cd1b063228bb85b1df536a3b54230
Author: Lasse Karkkainen <tro...@tr...>
Date: Sat Jul 25 06:48:18 2009 +0300
Fix NULL pointer dereference in ffmpeg.cc when file open fails.
---
game/ffmpeg.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/ffmpeg.cc b/game/ffmpeg.cc
index df38b23..a9a53b8 100644
--- a/game/ffmpeg.cc
+++ b/game/ffmpeg.cc
@@ -141,7 +141,7 @@ void FFmpeg::operator()() {
sigabrt = std::signal(SIGABRT, performous_ffmpeg_crash_hack);
sigsegv = std::signal(SIGSEGV, performous_ffmpeg_crash_hack);
#endif
- try { open(); } catch (std::exception const& e) { std::cerr << "FFMPEG failed to open " << m_filename << ": " << e.what() << std::endl; m_quit = true; }
+ try { open(); } catch (std::exception const& e) { std::cerr << "FFMPEG failed to open " << m_filename << ": " << e.what() << std::endl; m_quit = true; return; }
m_running = true;
audioQueue.setDuration(duration());
int errors = 0;
|