mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Add null check to Sensor::getHandles()
This commit is contained in:
@@ -116,7 +116,10 @@ std::vector<void*> Sensor::getHandles()
|
||||
std::vector<void*> nativeSensor;
|
||||
|
||||
for (const std::pair<SensorType, SDL_Sensor*> &data: sensors)
|
||||
nativeSensor.push_back(data.second);
|
||||
{
|
||||
if (data.second)
|
||||
nativeSensor.push_back(data.second);
|
||||
}
|
||||
|
||||
return nativeSensor;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user