diff options
author | Vincent Sanders <vince@kyllikki.org> | 2019-09-15 23:45:06 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-09-15 23:45:06 +0100 |
commit | 7c552edf87f93387321bcd003c825d8c4ba68d00 (patch) | |
tree | 8056c6c4b5b0cad922283b2d2944e492aac9f5e4 /frontends/gtk/window.c | |
parent | c67c4aa999f44b728bc508ff24060ea605f17e1e (diff) | |
download | netsurf-7c552edf87f93387321bcd003c825d8c4ba68d00.tar.gz netsurf-7c552edf87f93387321bcd003c825d8c4ba68d00.tar.bz2 |
ensure pixbuf references are updated correctly to avoid leaks
Diffstat (limited to 'frontends/gtk/window.c')
-rw-r--r-- | frontends/gtk/window.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/frontends/gtk/window.c b/frontends/gtk/window.c index 9368d7003..647f15fcb 100644 --- a/frontends/gtk/window.c +++ b/frontends/gtk/window.c @@ -1408,13 +1408,17 @@ gui_search_web_provider_update(const char *name, struct bitmap *bitmap) GdkPixbuf *pixbuf = NULL; if (bitmap != NULL) { - pixbuf = nsgdk_pixbuf_get_from_surface(bitmap->surface, 16, 16); + pixbuf = nsgdk_pixbuf_get_from_surface(bitmap->surface, 32, 32); } for (gw = window_list; gw != NULL; gw = gw->next) { nsgtk_toolbar_set_websearch_image(gw->toolbar, pixbuf); } + if (pixbuf != NULL) { + g_object_unref(pixbuf); + } + return NSERROR_OK; } |