mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Ahem. Doing loads of stuff to inst->cfg would probably be best done
_after_ allocating inst. Oops. [originally from svn r2571]
This commit is contained in:
parent
282aee7545
commit
4ec4de4f8b
12
unix/pterm.c
12
unix/pterm.c
@ -2251,12 +2251,6 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
gtk_init(&argc, &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
|
* Create an instance structure and initialise to zeroes
|
||||||
*/
|
*/
|
||||||
@ -2264,6 +2258,12 @@ int main(int argc, char **argv)
|
|||||||
memset(inst, 0, sizeof(*inst));
|
memset(inst, 0, sizeof(*inst));
|
||||||
inst->alt_keycode = -1; /* this one needs _not_ to be zero */
|
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);
|
inst->fonts[0] = gdk_font_load(inst->cfg.font);
|
||||||
if (!inst->fonts[0]) {
|
if (!inst->fonts[0]) {
|
||||||
fprintf(stderr, "pterm: unable to load font \"%s\"\n", inst->cfg.font);
|
fprintf(stderr, "pterm: unable to load font \"%s\"\n", inst->cfg.font);
|
||||||
|
Loading…
Reference in New Issue
Block a user