From 9dc625f0ca85b2272a4dda1150c5c178c91729ea Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 12 Jan 2003 15:45:29 +0000 Subject: [PATCH] Ahem. Doing loads of stuff to inst->cfg would probably be best done _after_ allocating inst. Oops. git-svn-id: svn://svn.tartarus.org/sgt/putty@2571 cda61777-01e9-0310-a592-d414129be87e --- unix/pterm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/unix/pterm.c b/unix/pterm.c index cc6b2d05..d31e884f 100644 --- a/unix/pterm.c +++ b/unix/pterm.c @@ -2251,12 +2251,6 @@ int main(int argc, char **argv) gtk_init(&argc, &argv); - if (do_cmdline(argc, argv, 0, &inst->cfg)) - exit(1); /* pre-defaults pass to get -class */ - do_defaults(NULL, &inst->cfg); - if (do_cmdline(argc, argv, 1, &inst->cfg)) - exit(1); /* post-defaults, do everything */ - /* * Create an instance structure and initialise to zeroes */ @@ -2264,6 +2258,12 @@ int main(int argc, char **argv) memset(inst, 0, sizeof(*inst)); inst->alt_keycode = -1; /* this one needs _not_ to be zero */ + if (do_cmdline(argc, argv, 0, &inst->cfg)) + exit(1); /* pre-defaults pass to get -class */ + do_defaults(NULL, &inst->cfg); + if (do_cmdline(argc, argv, 1, &inst->cfg)) + exit(1); /* post-defaults, do everything */ + inst->fonts[0] = gdk_font_load(inst->cfg.font); if (!inst->fonts[0]) { fprintf(stderr, "pterm: unable to load font \"%s\"\n", inst->cfg.font); -- 2.11.0