Skip to content

Commit

Permalink
Add check for null pointer in engine_impl::weather_time_factor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Kovalenko committed Oct 8, 2014
1 parent 3a788d0 commit f3362eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xrEngine/engine_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ void engine_impl::weather_time_factor (float const &value_raw)
float value = value_raw;
clamp (value, .01f, 100000.f);

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

if (g_pGamePersistent)
Expand Down

0 comments on commit f3362eb

Please sign in to comment.