From 5e9eabbc9ca3ab62c22db63e4e02b4f3169f137a Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Fri, 26 Apr 2013 18:30:00 +0200 Subject: [PATCH] small bugfix: access error while randoming in songmenu. i don't really know why this happens. and i don't really know why this fix helps. but i know that there is another bug somewhere. if you click rapidly on the middle mouse button in the song menu, the game will crash after some seconds. --- Vocaluxe/Lib/Sound/CGstreamerAudio.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Vocaluxe/Lib/Sound/CGstreamerAudio.cs b/Vocaluxe/Lib/Sound/CGstreamerAudio.cs index cc207e3e..496e49a0 100644 --- a/Vocaluxe/Lib/Sound/CGstreamerAudio.cs +++ b/Vocaluxe/Lib/Sound/CGstreamerAudio.cs @@ -26,9 +26,10 @@ namespace Vocaluxe.Lib.Sound class CGstreamerAudio : IPlayback { //static float LastPosition; + private CGstreamerAudioWrapper.LogCallback _LogCallback; #region log - private static void _LogHandler(string text) + private void _LogHandler(string text) { CLog.LogError(text); } @@ -36,9 +37,10 @@ namespace Vocaluxe.Lib.Sound public CGstreamerAudio() { + _LogCallback = _LogHandler; //Is this really needed? CodaAnalyzer complains about it... - //GC.SuppressFinalize(Log); - CGstreamerAudioWrapper.SetLogCallback(_LogHandler); + //GC.SuppressFinalize(_LogCallback); + CGstreamerAudioWrapper.SetLogCallback(_LogCallback); } public bool Init()