X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/ec5da3100dcef76794f5ef028f0f822f509bb832..12745e35f6aa5ba7b1a89afe6d5249d8ca46dd37:/macosx/osxwin.m?ds=sidebyside 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]; }