X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=macosx%2Fosxwin.m;h=59cc4bf9c4aa1cd02a528e802c0cd1b0a440713f;hb=8316deb3399fe1d0c406132cf2e795a76de26b64;hp=f0ebee4553adc61e712d71fcc7a5a22421e68488;hpb=fe8114d90b3a7719a22f2c3ebe18154191e4ddbd;p=PuTTY.git diff --git a/macosx/osxwin.m b/macosx/osxwin.m index f0ebee45..59cc4bf9 100644 --- a/macosx/osxwin.m +++ b/macosx/osxwin.m @@ -313,14 +313,16 @@ * Do so. */ sfree(alert_ctx); - if (term) - term_free(term); - if (logctx) - log_free(logctx); if (back) back->free(backhandle); if (ldisc) ldisc_free(ldisc); + /* ldisc must be freed before term, since ldisc_free expects term + * still to be around. */ + if (logctx) + log_free(logctx); + if (term) + term_free(term); [super dealloc]; }