From 1e418576da3496a5ca85c5aaf2816d0ccaa83af7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 9 Mar 2008 13:39:50 +0000 Subject: [PATCH] - fixed: StreamSong::SetPosition required a NULL pointer check. SVN r791 (trunk) --- docs/rh-log.txt | 1 + src/sound/music_stream.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index a9c6ffaa6..89a54bae7 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,5 @@ March 9, 2008 (Changes by Graf Zahl) +- fixed: StreamSong::SetPosition required a NULL pointer check. - fixed: The release build still linked to the old FMOD version. - fixed: SPCSong only works for Win32 so its definition must be excluded for Linux. diff --git a/src/sound/music_stream.cpp b/src/sound/music_stream.cpp index bddbfaf84..12fc8e60a 100644 --- a/src/sound/music_stream.cpp +++ b/src/sound/music_stream.cpp @@ -83,5 +83,12 @@ bool StreamSong::IsPlaying () bool StreamSong::SetPosition(int order) { - return m_Stream->SetPosition(order); + if (m_Stream != NULL) + { + return m_Stream->SetPosition(order); + } + else + { + return false; + } }