Author: jwilcox
Date: 2006-06-27 17:02:06 -0400 (Tue, 27 Jun 2006)
New Revision: 62095

Modified:
   trunk/ipod-sharp/src/Device.cs
Log:
guard against a KeyNotFoundException


Modified: trunk/ipod-sharp/src/Device.cs
===================================================================
--- trunk/ipod-sharp/src/Device.cs      2006-06-27 20:12:54 UTC (rev 62094)
+++ trunk/ipod-sharp/src/Device.cs      2006-06-27 21:02:06 UTC (rev 62095)
@@ -367,7 +367,11 @@
         }
 
         internal ArtworkFormat LookupFormat (int correlationId) {
-            return formats[correlationId];
+            try {
+                return formats[correlationId];
+            } catch (KeyNotFoundException e) {
+                return null;
+            }
         }
 
         public void LoadPhotoDatabase () {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to