From 2dec72b4d55b3e728a8582d7055584ecabfb8010 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Tue, 28 May 2013 20:12:47 +0100 Subject: Re-order Messages loading to avoid a crash on launch --- amiga/gui.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'amiga/gui.c') diff --git a/amiga/gui.c b/amiga/gui.c index 6ebde9bfe..b55992a50 100644 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -311,9 +311,6 @@ bool ami_locate_resource(char *fullpath, const char *file) found = ami_gui_check_resource(fullpath, file); if(found) return true; - /* Secondly check the user's selected theme. NB: ami_locate_resource() - * gets called for Messages before options are loaded */ - if(nsoption_charp(theme)) { strcpy(fullpath, nsoption_charp(theme)); @@ -993,9 +990,6 @@ int main(int argc, char** argv) current_user_options = ASPrintf("%s/Choices", current_user_dir); - if(ami_locate_resource(messages, "Messages") == false) - die("Cannot open Messages file"); - ami_mime_init("PROGDIR:Resources/mimetypes"); sprintf(temp, "%s/mimetypes.user", current_user_dir); ami_mime_init(temp); @@ -1018,6 +1012,9 @@ int main(int argc, char** argv) nsoption_read(current_user_options, NULL); nsoption_commandline(&argc, argv, NULL); + if(ami_locate_resource(messages, "Messages") == false) + die("Cannot open Messages file"); + ret = netsurf_init(messages); if (ret != NSERROR_OK) { die("NetSurf failed to initialise"); -- cgit v1.2.3