From 91135a95de1d860f14e4d867d4a5c87720dc1dec Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Tue, 3 Mar 2015 04:02:14 +0100 Subject: fixed double-free in Curses views * the Curses window associated with a Scinterm Scintilla view is INDEED deleted automatically by scintilla_delete() * The Scinterm documentation is WRONG on this. * This has been broken in the SciTECO code for a long time. Perhaps, for some obscure reason, this does not cause any problems on NCurses. It results in instant segfaults on MinGW/PDCurses though. --- src/interface-curses.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/interface-curses.h b/src/interface-curses.h index 8ee8811..2a83bcc 100644 --- a/src/interface-curses.h +++ b/src/interface-curses.h @@ -42,10 +42,13 @@ public: inline ~ViewCurses() { - if (sci) { - delwin(get_window()); + /* + * NOTE: This deletes/frees the view's + * curses WINDOW, despite of what Scinterm's + * documentation says. + */ + if (sci) scintilla_delete(sci); - } } inline void -- cgit v1.2.3