From 242368bdf6244bb3d636bec384233dbb33cba5d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 16 Mar 2017 19:16:24 +0100 Subject: [PATCH] GtkShaderBuilder Fix copy/paste error in precondition gtk_shader_builder_add_define should check both define_name and define_value for not-NULL and not-empty, but the second precondition check checks define_name again for not-empty-ness. --- gsk/gskshaderbuilder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsk/gskshaderbuilder.c b/gsk/gskshaderbuilder.c index 65c779af4f..7085c4158d 100644 --- a/gsk/gskshaderbuilder.c +++ b/gsk/gskshaderbuilder.c @@ -147,7 +147,7 @@ gsk_shader_builder_add_define (GskShaderBuilder *builder, { g_return_if_fail (GSK_IS_SHADER_BUILDER (builder)); g_return_if_fail (define_name != NULL && *define_name != '\0'); - g_return_if_fail (define_value != NULL && *define_name != '\0'); + g_return_if_fail (define_value != NULL && *define_value != '\0'); g_ptr_array_add (builder->defines, g_strdup (define_name)); g_ptr_array_add (builder->defines, g_strdup (define_value));