Solving issue 2324: "Crash when creating detail window" / Credits: Ingo, Hombre

This commit is contained in:
natureh.510
2014-04-03 23:15:48 +02:00
parent d79d3c3f7a
commit 2b873eb0d4
5 changed files with 12 additions and 6 deletions

View File

@@ -47,11 +47,12 @@ Crop::Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider)
Crop::~Crop () {
MyMutex::MyLock cropLock(cropMutex);
MyMutex::MyLock processingLock(parent->mProcessing);
std::vector<Crop*>::iterator i = std::find (parent->crops.begin(), parent->crops.end(), this);
if (i!=parent->crops.end ())
parent->crops.erase (i);
MyMutex::MyLock processingLock(parent->mProcessing);
freeAll ();
}