From 66becbab16a69f9a0873b1e05a88adbd6d09eb3c Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 30 Nov 2012 11:47:24 -0800 Subject: [PATCH] Fix crash on exit Subtitle formats unregister themselves when deleted, so using delete_clear on the list of subtitle formats does not work very well. --- aegisub/src/subtitle_format.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aegisub/src/subtitle_format.cpp b/aegisub/src/subtitle_format.cpp index df4db5c9e..15c3210a4 100644 --- a/aegisub/src/subtitle_format.cpp +++ b/aegisub/src/subtitle_format.cpp @@ -310,7 +310,8 @@ void SubtitleFormat::LoadFormats() { } void SubtitleFormat::DestroyFormats() { - delete_clear(formats); + while (!formats.empty()) + delete formats.back(); } template