[Banshee-List] Quick patch to fix PlayerEngine loading in current CVS



I'm finding with current CVS that the Helix PlayerEngine will not load
as it can't find a dll. Currently this means that no PlayerEngines are
loaded!

Here is a quick and dirty patch that fixes that. Any exception caused
by one PlayerEngine will not prevent the loading of the others. I
realise that there are some ongoing changes in this area so I'm not
trying any detailed work myself.


Regards,

Michael



Index: src/Banshee.Base/PlayerEngineCore.cs
===================================================================
--- src/Banshee.Base/PlayerEngineCore.cs        10 Mar 2006 17:25:11
-0000     1.6
+++ src/Banshee.Base/PlayerEngineCore.cs        12 Mar 2006 14:26:32 -0000
@@ -75,6 +75,13 @@
                             continue;
                         }
-
-                        PlayerEngine engine =
(PlayerEngine)Activator.CreateInstance(type);
+
+                        PlayerEngine engine;
+
+                        try {
+                               engine =
(PlayerEngine)Activator.CreateInstance(type);
+                        } catch (Exception ex) {
+                               continue;
+                        }
+
                         engine.StateChanged += OnEngineStateChanged;
                         engine.EventChanged += OnEngineEventChanged;



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