OSDN Git Service

Fixed crash when --no-sound was used and attempt to play incoming IM sound happened
authorLatif Khalifa <latifer@streamgrid.net>
Sun, 14 Aug 2011 00:13:45 +0000 (00:13 +0000)
committerLatif Khalifa <latifer@streamgrid.net>
Sun, 14 Aug 2011 00:13:45 +0000 (00:13 +0000)
git-svn-id: https://radegast.googlecode.com/svn/trunk@1089 f7a694da-4d33-11de-9ad6-1127a62b9fcd

Radegast/Core/Media/BufferSound.cs
Radegast/Core/Media/MediaManager.cs

index 62d53fa..50f5b27 100644 (file)
@@ -72,6 +72,8 @@ namespace Radegast.Media
 \r
         private void InitBuffer(UUID objectId, UUID soundId, bool loop, bool global, Vector3 worldpos, float vol)\r
         {\r
+            if (manager == null || !manager.SoundSystemAvailable) return;\r
+\r
             // Do not let this get garbage-collected.\r
             lock (allBuffers)\r
                 allBuffers[objectId] = this;\r
index 463216f..0a5a751 100644 (file)
@@ -632,6 +632,8 @@ namespace Radegast.Media
         /// <param name="sound">UUID of the sound to play</param>
         public void PlayUISound(UUID sound)
         {
+            if (!soundSystemAvailable) return;
+
             new BufferSound(
                 UUID.Random(),
                 sound,