app: all remaining g_assert() replaced by critical warning and return...

... in app/core.
Continuing on my crusade against asserting and crashing GIMP.
This commit is contained in:
Jehan
2018-01-22 15:55:47 +01:00
parent b4c7dd8fd8
commit 4c2df9b365
36 changed files with 69 additions and 57 deletions

View File

@ -85,8 +85,8 @@ gimp_layer_stack_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_LAYER));
g_return_if_fail (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_LAYER));
gimp_container_add_handler (container, "active-changed",
G_CALLBACK (gimp_layer_stack_layer_active),
@ -205,7 +205,7 @@ gimp_layer_stack_update_range (GimpLayerStack *stack,
{
GList *iter;
g_assert (first >= 0 && last >= -1);
g_return_if_fail (first >= 0 && last >= -1);
/* if the range is reversed, flip first and last; note that last == -1 is
* used to update all layers from first onward.