diff src/modplug/modplugbmp.cxx @ 1475:1c5688582a4e

fixed modplug, wasn't working properly with new threading model
author Giacomo Lozito <james@develia.org>
date Sat, 11 Aug 2007 22:15:50 +0200
parents 195b5657303e
children 488f7e6c36ed
line wrap: on
line diff
--- a/src/modplug/modplugbmp.cxx	Sat Aug 11 18:10:34 2007 +0300
+++ b/src/modplug/modplugbmp.cxx	Sat Aug 11 22:15:50 2007 +0200
@@ -25,6 +25,7 @@
 ModplugXMMS::ModplugXMMS()
 {
 	mSoundFile = new CSoundFile;
+	mOutPlug = NULL;
 }
 ModplugXMMS::~ModplugXMMS()
 {
@@ -490,7 +491,7 @@
 
 float32 ModplugXMMS::GetTime(void)
 {
-	if(mStopped)
+	if ((mStopped) || (!mOutPlug))
 		return -1;
 	return (float32)mOutPlug->output_time() / 1000;
 }