From 796ac470b5e86e185ebfcd9b5d3f1a8686b7662f Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 29 Jun 2015 15:11:26 +0100 Subject: Improve resource code to not try and use g_resource calls when disabled. --- gtk/resources.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gtk/resources.c b/gtk/resources.c index 0c8c192f3..b90fdd49b 100644 --- a/gtk/resources.c +++ b/gtk/resources.c @@ -256,12 +256,15 @@ static nserror init_direct_resource(char **respath, struct nsgtk_resource_s *resource) { nserror res; - GBytes *data; res = init_resource(respath, resource); + +#ifdef WITH_GRESOURCE if ((res == NSERROR_OK) && (resource->type == NSGTK_RESOURCE_GLIB)) { /* found gresource we can convert */ + GBytes *data; + data = g_resources_lookup_data(resource->path, G_RESOURCE_LOOKUP_FLAGS_NONE, NULL); @@ -270,6 +273,7 @@ init_direct_resource(char **respath, struct nsgtk_resource_s *resource) resource->path = (char *)data; } } +#endif return res; } -- cgit v1.2.3