mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-09 03:58:55 +01:00
fix: the bugs and vulnerabilities SonarCloud reports on PR #216
This commit is contained in:
@@ -329,8 +329,9 @@ void windscreen_water::update(double const Seconds)
|
||||
build(*cab);
|
||||
}
|
||||
}
|
||||
if (m_glasscount == 0)
|
||||
if ((vehicle == nullptr) || (m_glasscount == 0))
|
||||
{
|
||||
// no glasses without a cab, which comes with the vehicle
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user