From 406a322a5db4d7798ac2c28b9dc9b484f103383a Mon Sep 17 00:00:00 2001 From: ghaushe Date: Thu, 6 Feb 2003 02:48:10 +0000 Subject: [PATCH] Prevent a segfault when checking for playing tracks when none are queued. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@690 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/libs/sound/trackplayer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc2/src/sc2code/libs/sound/trackplayer.c b/sc2/src/sc2code/libs/sound/trackplayer.c index 3248fb68a..6ccd06eb8 100644 --- a/sc2/src/sc2code/libs/sound/trackplayer.c +++ b/sc2/src/sc2code/libs/sound/trackplayer.c @@ -124,7 +124,7 @@ PlayingTrack () { // this is not a great way to detect whether the track is playing, // but as it should work during fast-forward/rewind, 'PlayingStream' can't be used - if (is_sample_playing (sound_sample)) + if (sound_sample && is_sample_playing (sound_sample)) { int last_track, last_page; LockMutex (track_mutex);