[f-spot] Add null check to avoid crashes.



commit 4bb98df04b87a34b19e7fa40904516fd070b2f17
Author: Ruben Vermeersch <ruben savanne be>
Date:   Thu Jul 22 15:31:55 2010 +0200

    Add null check to avoid crashes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=624665

 src/Core/ColorManagement.cs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/ColorManagement.cs b/src/Core/ColorManagement.cs
index 083268e..793e03b 100644
--- a/src/Core/ColorManagement.cs
+++ b/src/Core/ColorManagement.cs
@@ -66,7 +66,7 @@ namespace FSpot {
 				string[] IcmColorProfilList = System.IO.Directory.GetFiles (path, "*.icm");
 				foreach (string ColorProfilePath in IcmColorProfilList) {
 					Cms.Profile profile = new Cms.Profile (ColorProfilePath);
-					if ((Cms.IccColorSpace)profile.ColorSpace == Cms.IccColorSpace.Rgb && !profs.ContainsKey (profile.ProductDescription))
+					if ((Cms.IccColorSpace)profile.ColorSpace == Cms.IccColorSpace.Rgb && profile.ProductDescription != null && !profs.ContainsKey (profile.ProductDescription))
 						profs.Add(profile.ProductDescription, profile);
 				}
 				string[] DirList = System.IO.Directory.GetDirectories (path);



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