[gimp] g_return_if_fail() on attempts to set locks that can't be changed
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] g_return_if_fail() on attempts to set locks that can't be changed
- Date: Sun, 23 Aug 2009 17:54:56 +0000 (UTC)
commit 922375cecad12f1f0fe5d9bb1ea20be3cabffe6c
Author: Michael Natterer <mitch gimp org>
Date: Sun Aug 23 19:54:19 2009 +0200
g_return_if_fail() on attempts to set locks that can't be changed
app/core/gimpitem.c | 1 +
app/core/gimplayer.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpitem.c b/app/core/gimpitem.c
index 9a71966..16944cc 100644
--- a/app/core/gimpitem.c
+++ b/app/core/gimpitem.c
@@ -1611,6 +1611,7 @@ gimp_item_set_lock_content (GimpItem *item,
gboolean push_undo)
{
g_return_if_fail (GIMP_IS_ITEM (item));
+ g_return_if_fail (gimp_item_can_lock_content (item));
lock_content = lock_content ? TRUE : FALSE;
diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c
index bb79e02..ebbaee9 100644
--- a/app/core/gimplayer.c
+++ b/app/core/gimplayer.c
@@ -2029,6 +2029,7 @@ gimp_layer_set_lock_alpha (GimpLayer *layer,
gboolean push_undo)
{
g_return_if_fail (GIMP_IS_LAYER (layer));
+ g_return_if_fail (gimp_layer_can_lock_alpha (layer));
lock_alpha = lock_alpha ? TRUE : FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]