From 7cf2adfec4ecdd881cb1c437bbc445138a871b81 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 16 Sep 2012 18:42:25 +0200 Subject: [PATCH] cssvalue: Always consider values equal to themselves --- gtk/gtkcssvalue.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gtk/gtkcssvalue.c b/gtk/gtkcssvalue.c index b71eed1957..0dcbe0c499 100644 --- a/gtk/gtkcssvalue.c +++ b/gtk/gtkcssvalue.c @@ -103,6 +103,9 @@ _gtk_css_value_equal (const GtkCssValue *value1, g_return_val_if_fail (value1 != NULL, FALSE); g_return_val_if_fail (value2 != NULL, FALSE); + if (value1 == value2) + return TRUE; + if (value1->class != value2->class) return FALSE; @@ -113,7 +116,8 @@ gboolean _gtk_css_value_equal0 (const GtkCssValue *value1, const GtkCssValue *value2) { - if (value1 == NULL && value2 == NULL) + /* Inclues both values being NULL */ + if (value1 == value2) return TRUE; if (value1 == NULL || value2 == NULL)