From 1a763044fe071d791dbce9be4caa7da6fc3dbe9f Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 20 Jul 2011 02:11:51 +0200 Subject: [PATCH] cssprovider: Emit an error when parsing a binding fails --- gtk/gtkcssprovider.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index c0bbed6c11..97d6b854eb 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -1803,7 +1803,15 @@ parse_binding_set (GtkCssScanner *scanner) continue; } - gtk_binding_entry_add_signal_from_string (binding_set, name); + if (gtk_binding_entry_add_signal_from_string (binding_set, name) != G_TOKEN_NONE) + { + gtk_css_provider_error_literal (scanner->provider, + scanner, + GTK_CSS_PROVIDER_ERROR, + GTK_CSS_PROVIDER_ERROR_SYNTAX, + "Failed to parse binding set."); + } + g_free (name); if (!_gtk_css_parser_try (scanner->parser, ";", TRUE))