summaryrefslogtreecommitdiff
path: root/src/context/context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/context/context.cpp')
-rw-r--r--src/context/context.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/context/context.cpp b/src/context/context.cpp
index d2e2bfa1b..05024430c 100644
--- a/src/context/context.cpp
+++ b/src/context/context.cpp
@@ -177,6 +177,10 @@ ContextObj* ContextObj::restoreAndContinue() {
void ContextObj::destroy() throw(AssertionException) {
for(;;) {
+ // If valgrind reports invalid writes on the next few lines,
+ // here's a hint: make sure all classes derived from ContextObj in
+ // the system properly call destroy() in their destructors.
+ // That's needed to maintain this linked list properly.
if(next() != NULL) {
next()->prev() = prev();
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback