[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54376] trunk/blender/source/gameengine/ Ketsji/KX_SoundActuator.cpp: Fix part of #34083: crash trying to play surround .wav file in the game engine

Brecht Van Lommel brechtvanlommel at pandora.be
Thu Feb 7 22:29:32 CET 2013


Revision: 54376
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54376
Author:   blendix
Date:     2013-02-07 21:29:31 +0000 (Thu, 07 Feb 2013)
Log Message:
-----------
Fix part of #34083: crash trying to play surround .wav file in the game engine
on Windows, it still doesn't play but it doesn't crash at least.

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	2013-02-07 17:02:31 UTC (rev 54375)
+++ trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp	2013-02-07 21:29:31 UTC (rev 54376)
@@ -132,10 +132,13 @@
 		handle3d->setConeVolumeOuter(m_3d.cone_outer_gain);
 	}
 
-	if (loop)
-		m_handle->setLoopCount(-1);
-	m_handle->setPitch(m_pitch);
-	m_handle->setVolume(m_volume);
+	if (m_handle.get()) {
+		if (loop)
+			m_handle->setLoopCount(-1);
+		m_handle->setPitch(m_pitch);
+		m_handle->setVolume(m_volume);
+	}
+
 	m_isplaying = true;
 }
 




More information about the Bf-blender-cvs mailing list