[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16991] trunk/blender/source/gameengine/ Ketsji/KX_SoundActuator.cpp: Fix a crash on null pointer in previous commit .

Benoit Bolsee benoit.bolsee at online.be
Thu Oct 9 08:20:16 CEST 2008


Revision: 16991
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16991
Author:   ben2610
Date:     2008-10-09 08:20:16 +0200 (Thu, 09 Oct 2008)

Log Message:
-----------
Fix a crash on null pointer in previous commit.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp

Modified: trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp	2008-10-09 06:06:11 UTC (rev 16990)
+++ trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp	2008-10-09 06:20:16 UTC (rev 16991)
@@ -101,7 +101,6 @@
 	if (!frame)
 		return true;
 	bool result = false;
-	bool isplaying = (m_soundObject->GetPlaystate() != SND_STOPPED) ? true : false;
 
 	// do nothing on negative events, otherwise sounds are played twice!
 	bool bNegativeEvent = IsNegativeEvent();
@@ -111,6 +110,9 @@
 	if (!m_soundObject)
 		return false;
 
+	// actual audio device playing state
+	bool isplaying = (m_soundObject->GetPlaystate() != SND_STOPPED) ? true : false;
+
 	if (m_pino)
 	{
 		bNegativeEvent = true;





More information about the Bf-blender-cvs mailing list