[banshee/gtk3] Equalizer: make static field be non-static



commit 64488ce01080a2eeaab186fc498e3c8283148b2e
Author: Andres G. Aragoneses <knocte gmail com>
Date:   Tue Dec 18 23:37:31 2012 +0000

    Equalizer: make static field be non-static
    
    Again, the query of SchemaEntry objects by GSettingsSchemaExtractor was
    causing an exception because this static field needed initialization. We
    can simply convert it to non-static so it will be more lazy-loaded and not
    give problems when inspecting via reflection.
    
    The exception was, for the record:
    
    [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for Banshee.Equalizer.EqualizerManager ---> System.ArgumentNullException: Argument cannot be null.
    Parameter name: path1
      at System.IO.Path.Combine (System.String path1, System.String path2) [0x000be] in /home/andres1210/Code/mono/mcs/class/corlib/System.IO/Path.cs:126
      at Banshee.Equalizer.EqualizerManager..cctor () [0x00000] in /home/andres1210/Code/bansheeGTK3/src/Core/Banshee.Services/Banshee.Equalizer/EqualizerManager.cs:50
      --- End of inner exception stack trace ---
      at (wrapper managed-to-native) System.Reflection.MonoField:GetValueInternal (System.Reflection.MonoField,object)
      at System.Reflection.MonoField.GetValue (System.Object obj) [0x0006a] in /home/andres1210/Code/mono/mcs/class/corlib/System.Reflection/MonoField.cs:125
      at GSettingsSchemaExtractorProgram.Extract (IEnumerable`1 types) [0x000ad] in /home/andres1210/Code/bansheeGTK3/build/GSettingsSchemaExtractor.cs:78
      at GSettingsSchemaExtractorProgram.Extract (System.IO.DirectoryInfo dir) [0x000ae] in /home/andres1210/Code/bansheeGTK3/build/GSettingsSchemaExtractor.cs:48
      at GSettingsSchemaExtractorProgram.Main (System.String[] args) [0x0004f] in /home/andres1210/Code/bansheeGTK3/build/GSettingsSchemaExtractor.cs:27

 .../Banshee.Equalizer/EqualizerManager.cs          |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Equalizer/EqualizerManager.cs b/src/Core/Banshee.Services/Banshee.Equalizer/EqualizerManager.cs
index 9effe5a..dc80482 100644
--- a/src/Core/Banshee.Services/Banshee.Equalizer/EqualizerManager.cs
+++ b/src/Core/Banshee.Services/Banshee.Equalizer/EqualizerManager.cs
@@ -47,7 +47,7 @@ namespace Banshee.Equalizer
 {
     public class EqualizerManager : IEnumerable<EqualizerSetting>, IEnumerable
     {
-        private static string legacy_xml_path = System.IO.Path.Combine (
+        private string legacy_xml_path = System.IO.Path.Combine (
             Paths.ApplicationData, "equalizers.xml");
 
         private static EqualizerManager instance;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]