[f-spot/0_6] Fix crash when editing empty icon and a color profile is active
- From: Lorenzo Milesi <lmilesi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [f-spot/0_6] Fix crash when editing empty icon and a color profile is active
- Date: Fri, 14 Aug 2009 08:50:45 +0000 (UTC)
commit a438d8c1a28eebb2170224411b85461561d082a6
Author: Matti Kerttula <matti kerttula gmail com>
Date: Fri Aug 14 09:52:04 2009 +0200
Fix crash when editing empty icon and a color profile is active
Fixes bgo#591513
src/UI.Dialog/EditTagDialog.cs | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/UI.Dialog/EditTagDialog.cs b/src/UI.Dialog/EditTagDialog.cs
index 1a482c4..2f28407 100644
--- a/src/UI.Dialog/EditTagDialog.cs
+++ b/src/UI.Dialog/EditTagDialog.cs
@@ -42,7 +42,7 @@ namespace FSpot.UI.Dialog
icon_image.Pixbuf = t.Icon;
Cms.Profile screen_profile;
- if (FSpot.ColorManagement.Profiles.TryGetValue (Preferences.Get<string> (Preferences.COLOR_MANAGEMENT_DISPLAY_PROFILE), out screen_profile)) {
+ if (icon_image.Pixbuf != null && FSpot.ColorManagement.Profiles.TryGetValue (Preferences.Get<string> (Preferences.COLOR_MANAGEMENT_DISPLAY_PROFILE), out screen_profile)) {
icon_image.Pixbuf = icon_image.Pixbuf.Copy();
FSpot.ColorManagement.ApplyProfile (icon_image.Pixbuf, screen_profile);
}
@@ -122,7 +122,7 @@ namespace FSpot.UI.Dialog
tag.Icon = null;
Cms.Profile screen_profile;
- if (FSpot.ColorManagement.Profiles.TryGetValue (Preferences.Get<string> (Preferences.COLOR_MANAGEMENT_DISPLAY_PROFILE), out screen_profile)) {
+ if (tag.Icon != null && FSpot.ColorManagement.Profiles.TryGetValue (Preferences.Get<string> (Preferences.COLOR_MANAGEMENT_DISPLAY_PROFILE), out screen_profile)) {
icon_image.Pixbuf = tag.Icon.Copy();
FSpot.ColorManagement.ApplyProfile(icon_image.Pixbuf, screen_profile);
} else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]