From 7e106aedd93b82fdb4ddbfb16b3c810d94ebb7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Tue, 2 Jan 2018 21:12:32 +0100 Subject: [PATCH] Fix crash on exit in YACReader. The problem was the default texture in the flow being deleted more than once. --- YACReader/main.cpp | 2 ++ common/gl/yacreader_flow_gl.cpp | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/YACReader/main.cpp b/YACReader/main.cpp index 90c1545b..3d9a0ec0 100644 --- a/YACReader/main.cpp +++ b/YACReader/main.cpp @@ -165,6 +165,8 @@ int main(int argc, char * argv[]) int ret = app.exec(); + delete mwv; + //Configuration::getConfiguration().save(); YACReader::exitCheck(ret); diff --git a/common/gl/yacreader_flow_gl.cpp b/common/gl/yacreader_flow_gl.cpp index 45c30820..51431661 100644 --- a/common/gl/yacreader_flow_gl.cpp +++ b/common/gl/yacreader_flow_gl.cpp @@ -1341,8 +1341,20 @@ YACReaderPageFlowGL::~YACReaderPageFlowGL() this->killTimer(timerId); //worker->deleteLater(); rawImages.clear(); - for(int i = 0;icontext() != nullptr && this->context()->isValid()) + { + for(int i = 0; i