aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-03 04:02:14 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-03 04:26:46 +0100
commit91135a95de1d860f14e4d867d4a5c87720dc1dec (patch)
treeac8a8c2344d5282f8caa4906ba22641c8f8cf6e3 /src
parent65569ca936dec1dde6db4581e246ec1cf5858c3e (diff)
downloadsciteco-91135a95de1d860f14e4d867d4a5c87720dc1dec.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/interface-curses.h9
1 files changed, 6 insertions, 3 deletions
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