fix API::exit issue
This commit is contained in:
parent
e449cd5a24
commit
1b01493e9f
@ -264,22 +264,20 @@ namespace API
|
|||||||
if((wd->thread_id == tid) && (wd->root != root))
|
if((wd->thread_id == tid) && (wd->root != root))
|
||||||
{
|
{
|
||||||
root = wd->root;
|
root = wd->root;
|
||||||
|
bool exists = false;
|
||||||
for (auto i = roots.cbegin(); i != roots.cend(); ++i)
|
for (auto i = roots.cbegin(); i != roots.cend(); ++i)
|
||||||
{
|
{
|
||||||
if (*i == root)
|
if (*i == root)
|
||||||
{
|
{
|
||||||
root = nullptr;
|
exists = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!root)
|
if (!exists)
|
||||||
{
|
|
||||||
root = wd->root;
|
|
||||||
roots.push_back(root);
|
roots.push_back(root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
for(auto i : roots)
|
for(auto i : roots)
|
||||||
restrict::interface_type::close_window(i);
|
restrict::interface_type::close_window(i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user