summaryrefslogtreecommitdiff
path: root/frontends/gtk/scaffolding.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-12-10 22:57:06 +0000
committerVincent Sanders <vince@kyllikki.org>2017-12-10 22:57:06 +0000
commiteba0fd70ebf937ad10f7bb1221268a9552d494fa (patch)
tree89bc18fb354211e3c289e2d7579c798e0f83aa12 /frontends/gtk/scaffolding.c
parent30ee1f630a09a718a6fb603f69f257e0ae244b8c (diff)
downloadnetsurf-eba0fd70ebf937ad10f7bb1221268a9552d494fa.tar.gz
netsurf-eba0fd70ebf937ad10f7bb1221268a9552d494fa.tar.bz2
clean up toolbar configuration to be slightly less buggy
Diffstat (limited to 'frontends/gtk/scaffolding.c')
-rw-r--r--frontends/gtk/scaffolding.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/frontends/gtk/scaffolding.c b/frontends/gtk/scaffolding.c
index cbc46cbc5..6f81e91db 100644
--- a/frontends/gtk/scaffolding.c
+++ b/frontends/gtk/scaffolding.c
@@ -2073,7 +2073,7 @@ struct nsgtk_scaffolding *nsgtk_new_scaffolding(struct gui_window *toplevel)
int i;
GtkAccelGroup *group;
- gs = malloc(sizeof(*gs));
+ gs = calloc(1, sizeof(*gs));
if (gs == NULL) {
return NULL;
}
@@ -2491,7 +2491,11 @@ gui_search_web_provider_update(const char *provider_name,
/* set the search provider parameters up in each scaffold */
for (current = scaf_list; current != NULL; current = current->next) {
- /* add ico to each window's toolbar */
+ if (current->webSearchEntry == NULL) {
+ continue;
+ }
+
+ /* add ico to each window's toolbar */
if (srch_pixbuf != NULL) {
nsgtk_entry_set_icon_from_pixbuf(current->webSearchEntry,
GTK_ENTRY_ICON_PRIMARY,