diff --git a/src/graphics/render.cpp b/src/graphics/render.cpp index 2c1a6b58b..a7e2ef4f2 100644 --- a/src/graphics/render.cpp +++ b/src/graphics/render.cpp @@ -1023,7 +1023,7 @@ void IrrDriver::renderLights(unsigned pointlightcount) irr_driver->getSceneManager()->setAmbientLight(SColor(0, 0, 0, 0)); // Render sunlight if and only if track supports shadow - if (World::getWorld()->getTrack()->hasShadows()) + if (World::getWorld() && World::getWorld()->getTrack()->hasShadows()) { if (UserConfigParams::m_shadows) m_post_processing->renderShadowedSunlight(sun_ortho_matrix, m_rtts->getShadowDepthTex()); diff --git a/src/guiengine/widgets/model_view_widget.cpp b/src/guiengine/widgets/model_view_widget.cpp index 886c1c4f0..10a79fe3b 100644 --- a/src/guiengine/widgets/model_view_widget.cpp +++ b/src/guiengine/widgets/model_view_widget.cpp @@ -179,7 +179,7 @@ void ModelViewWidget::update(float delta) std::vector glows; irr_driver->computeCameraMatrix(m_camera, 512, 512); - irr_driver->renderScene(m_camera, glows, GUIEngine::getLatestDt(), false, true); + irr_driver->renderScene(m_camera, 0, glows, GUIEngine::getLatestDt(), false, true); m_frame_buffer = irr_driver->getPostProcessing()->render(m_camera); glViewport(0, 0, UserConfigParams::m_width, UserConfigParams::m_height);