forked from rosebudai/OpenRCT2-Web
Fixing crash when removing null socket
This commit is contained in:
1 parent
169e7345f7
commit
96cb09da9e
1 file changed
+2
@@ -2115,6 +2115,8 @@ void ScriptEngine::RemoveSockets(const std::shared_ptr<Plugin>& plugin)
|
||||
{
|
||||
#ifndef DISABLE_NETWORK
|
||||
std::erase_if(_sockets, [plugin](const std::shared_ptr<SocketDataBase>& data) {
|
||||
if (data == nullptr)
|
||||
return true;
|
||||
if (data->_plugin == plugin)
|
||||
{
|
||||
data->Dispose();
|
||||
|
||||
Reference in new issue
Block a user