nit: remove extra weak ptr lock

This commit is contained in:
Rasmus Karlsson 2024-10-20 10:03:47 +02:00
parent 30c7618fe5
commit fd2dd6c13f
No known key found for this signature in database

View file

@ -152,12 +152,11 @@ void HTTPRequest::execute(sol::this_state L)
// this could happen if the plugin was deleted
return;
}
auto strong = hack.lock();
auto *pl = getApp()->getPlugins()->getPluginByStatePtr(L);
for (auto it = pl->httpRequests.begin();
it < pl->httpRequests.end(); it++)
{
if (*it == strong)
if (*it == self)
{
pl->httpRequests.erase(it);
break;