[f-spot/FSPOT_0_6_0_STABLE] Avoid a crash if a color profile doesn't	have a ProductName
- From: Stephane Delcroix <sdelcroix src gnome org>
 
- To: svn-commits-list gnome org
 
- Cc: 
 
- Subject: [f-spot/FSPOT_0_6_0_STABLE] Avoid a crash if a color profile doesn't	have a ProductName
 
- Date: Fri, 25 Sep 2009 12:22:36 +0000 (UTC)
 
commit 610d02aeaca81e320eb482a715630fb0801f5690
Author: Stephane Delcroix <stephane delcroix org>
Date:   Fri Sep 25 14:20:10 2009 +0200
    Avoid a crash if a color profile doesn't have a ProductName
    
    fixes bgo #596279
 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 7790d8d..2bbcfd1 100644
--- a/src/Core/ColorManagement.cs
+++ b/src/Core/ColorManagement.cs
@@ -60,7 +60,7 @@ namespace FSpot {
 				string[] IccColorProfilList = System.IO.Directory.GetFiles (path, "*.icc");
 				foreach (string ColorProfilePath in IccColorProfilList) {
 					Cms.Profile profile = new Cms.Profile (ColorProfilePath);
-					if ((Cms.IccColorSpace)profile.ColorSpace == Cms.IccColorSpace.Rgb && !profs.ContainsKey (profile.ProductName))
+					if ((Cms.IccColorSpace)profile.ColorSpace == Cms.IccColorSpace.Rgb && profile.ProductName != null && !profs.ContainsKey (profile.ProductName))
 						profs.Add(profile.ProductName, profile);
 				}
 				string[] IcmColorProfilList = System.IO.Directory.GetFiles (path, "*.icm");
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]