[gtk/wip/baedert/for-master: 49/54] rendernodeparser: Handle resolving NULL urls
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 49/54] rendernodeparser: Handle resolving NULL urls
- Date: Tue, 19 Nov 2019 09:46:41 +0000 (UTC)
commit 3d7817154ce927307b321dded6baa533f6be90f5
Author: Timm Bäder <mail baedert org>
Date: Tue Nov 19 09:37:03 2019 +0100
rendernodeparser: Handle resolving NULL urls
gsk/gskrendernodeparser.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c
index 328a2448fc..04a690935f 100644
--- a/gsk/gskrendernodeparser.c
+++ b/gsk/gskrendernodeparser.c
@@ -109,8 +109,16 @@ parse_texture (GtkCssParser *parser,
GFile *file;
file = gtk_css_parser_resolve_url (parser, url);
- texture = gdk_texture_new_from_file (file, &error);
- g_object_unref (file);
+
+ if (file)
+ {
+ texture = gdk_texture_new_from_file (file, &error);
+ g_object_unref (file);
+ }
+ else
+ {
+ texture = NULL;
+ }
}
g_free (scheme);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]