From f23a285103aaa012bf60a801ea9c483000301b8f Mon Sep 17 00:00:00 2001 From: Chris Young Date: Wed, 23 Dec 2009 13:47:50 +0000 Subject: It helps to allocate enough memory for 40 LONGs, and that memory needs to be returned regardless as passing a NULL to chooser.gadget crashes it. svn path=/trunk/netsurf/; revision=9757 --- amiga/gui_options.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'amiga/gui_options.c') diff --git a/amiga/gui_options.c b/amiga/gui_options.c index a33febfa7..a92503ce7 100755 --- a/amiga/gui_options.c +++ b/amiga/gui_options.c @@ -1748,12 +1748,12 @@ STRPTR *ami_gui_opts_websearch(void) ULONG ref = 0; STRPTR *websearchlist; - if (option_search_engines_file == NULL) return NULL; + websearchlist = AllocVec(200, MEMF_CLEAR); - FILE *f = fopen(option_search_engines_file, "r"); - if (f == NULL) return NULL; + if (option_search_engines_file == NULL) return websearchlist; - websearchlist = AllocVec(40, MEMF_CLEAR); + FILE *f = fopen(option_search_engines_file, "r"); + if (f == NULL) return websearchlist; while (fgets(buf, sizeof(buf), f) != NULL) { if (buf[0] == '\0') continue; -- cgit v1.2.3