[banshee/stable-1.8] [ThickClient] Fix IntPtr ctor issue in SourceComboBox



commit f43442d9ed03a2dab5b2fc1a5a3a369d2597bd12
Author: Alan McGovern <alan mcgovern gmail com>
Date:   Sun Nov 7 16:58:48 2010 -0600

    [ThickClient] Fix IntPtr ctor issue in SourceComboBox
    
    The issue is we don't keep a managed ref to the GLib.Object subclass, so
    when a callback comes in referencing it GLib.ObjectManager tries to
    reinstantiate a managed object from the native ptr.  Fixes bgo#632246
    
    Signed-off-by: Gabriel Burt <gabriel burt gmail com>

 .../Banshee.Sources.Gui/SourceComboBox.cs          |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceComboBox.cs b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceComboBox.cs
index 954dec8..7abc4a1 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceComboBox.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceComboBox.cs
@@ -38,6 +38,7 @@ namespace Banshee.Sources.Gui
 {
     public class SourceComboBox : ComboBox
     {
+        SourceRowRenderer renderer;
         private SourceModel store;
         public new SourceModel Model {
             get { return store; }
@@ -46,7 +47,7 @@ namespace Banshee.Sources.Gui
 
         public SourceComboBox ()
         {
-            SourceRowRenderer renderer = new SourceRowRenderer ();
+            renderer = new SourceRowRenderer ();
             renderer.ParentWidget = this;
             PackStart (renderer, true);
             SetCellDataFunc (renderer, new CellLayoutDataFunc (SourceRowRenderer.CellDataHandler));



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