Skip to content

Commit f3362eb

Browse files
author
Pavel Kovalenko
committed
Add check for null pointer in engine_impl::weather_time_factor.
1 parent 3a788d0 commit f3362eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/xrEngine/engine_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ void engine_impl::weather_time_factor (float const &value_raw)
305305
float value = value_raw;
306306
clamp (value, .01f, 100000.f);
307307

308-
if (g_pGameLevel)
308+
if (g_pGameLevel && g_pGamePersistent)
309309
g_pGameLevel->SetEnvironmentGameTimeFactor (iFloor(g_pGamePersistent->Environment().GetGameTime()*1000.f), value);
310310

311311
if (g_pGamePersistent)

0 commit comments

Comments
 (0)