mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
FileView: Fixed heap corruption.
This commit is contained in:
parent
c5df90bbee
commit
ddbdc71111
@ -650,21 +650,18 @@ PLUGIN_EXPORT void Finalize(void* data)
|
|||||||
ParentMeasure* parent = child->parent;
|
ParentMeasure* parent = child->parent;
|
||||||
|
|
||||||
EnterCriticalSection(&g_CriticalSection);
|
EnterCriticalSection(&g_CriticalSection);
|
||||||
if (parent->thread)
|
|
||||||
{
|
|
||||||
TerminateThread(parent->thread, 0);
|
|
||||||
parent->thread = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parent && parent->ownerChild == child)
|
if (parent && parent->ownerChild == child)
|
||||||
{
|
{
|
||||||
CloseHandle(parent->thread);
|
if (parent->thread)
|
||||||
parent->thread = nullptr;
|
{
|
||||||
|
TerminateThread(parent->thread, 0);
|
||||||
delete parent;
|
parent->thread = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
auto iter = std::find(g_ParentMeasures.begin(), g_ParentMeasures.end(), parent);
|
auto iter = std::find(g_ParentMeasures.begin(), g_ParentMeasures.end(), parent);
|
||||||
g_ParentMeasures.erase(iter);
|
g_ParentMeasures.erase(iter);
|
||||||
|
|
||||||
|
delete parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete child;
|
delete child;
|
||||||
|
Loading…
Reference in New Issue
Block a user