From 0a460ea9c6435c1ea1196015f63b935348829732 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Thu, 27 Jun 2019 11:12:01 +0200 Subject: [PATCH] The container for temp files to be removed was a vector, but it needed stable member addresses. make it a list --- src/qtgui/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qtgui/main.cpp b/src/qtgui/main.cpp index ebb6ba46..da6ac3cc 100644 --- a/src/qtgui/main.cpp +++ b/src/qtgui/main.cpp @@ -17,6 +17,7 @@ #include "autoconfig.h" #include +#include #include #include @@ -50,7 +51,9 @@ extern RclConfig *theconfig; std::mutex thetempfileslock; -static vector o_tempfiles; +// Use a list not a vector so that contained objects have stable +// addresses when extending. +static list o_tempfiles; /* Keep an array of temporary files for deletion at exit. It happens that we erase some of them before exiting (ie: when closing a preview tab), we don't reuse the array holes for now */