g_return_if_fail() on attempts to set locks that can't be changed

This commit is contained in:
Michael Natterer 2009-08-23 19:54:19 +02:00
parent aa70c13fd6
commit 922375ceca
2 changed files with 2 additions and 0 deletions

View File

@ -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;

View File

@ -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;