diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-06-29 15:11:26 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-06-29 15:11:26 +0100 |
commit | 796ac470b5e86e185ebfcd9b5d3f1a8686b7662f (patch) | |
tree | 0241e3af9d9056e5b169b690739a809d9171f6f1 /gtk | |
parent | 822e3a8fd05466df1ddd9450374e8d0aaeb7f272 (diff) | |
download | netsurf-796ac470b5e86e185ebfcd9b5d3f1a8686b7662f.tar.gz netsurf-796ac470b5e86e185ebfcd9b5d3f1a8686b7662f.tar.bz2 |
Improve resource code to not try and use g_resource calls when disabled.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/resources.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |