summaryrefslogtreecommitdiff
path: root/gtk/gtkcssprovider.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2019-04-09 02:29:27 +0200
committerBenjamin Otte <otte@redhat.com>2019-04-12 19:34:28 +0200
commit607502ef437978088caed0309137244dbda7a1e8 (patch)
treed15b6d74cf34dc7af0a4a6e0a91a82b970ea7014 /gtk/gtkcssprovider.c
parentacddc317da3f34ed86824f5c7a725a242b7ade50 (diff)
downloadgtk+-607502ef437978088caed0309137244dbda7a1e8.tar.gz
cssparser: Add gtk_css_parser_consume_url()
Another slight renaming and semantics change.
Diffstat (limited to 'gtk/gtkcssprovider.c')
-rw-r--r--gtk/gtkcssprovider.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index bb77fcdbaa..1abcaa8472 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -787,12 +787,17 @@ parse_import (GtkCssScanner *scanner)
char *url;
url = gtk_css_parser_consume_string (scanner->parser);
- file = gtk_css_parser_resolve_url (scanner->parser, url);
- g_free (url);
+ if (url)
+ {
+ file = gtk_css_parser_resolve_url (scanner->parser, url);
+ g_free (url);
+ }
+ else
+ file = NULL;
}
else
{
- file = _gtk_css_parser_read_url (scanner->parser);
+ file = gtk_css_parser_consume_url (scanner->parser);
}
if (file == NULL)