Skip to content
Snippets Groups Projects
Commit b58dcb12 authored by David Maul's avatar David Maul :crab:
Browse files

fix triplicate present

parent a31b43eb
No related branches found
No related tags found
No related merge requests found
......@@ -97,18 +97,7 @@ void Engine::render()
throw std::runtime_error("Could not clear renderer: " + std::string(SDL_GetError()));
}
if (scenes.empty())
{
SDL_RenderPresent(this->sdl_renderer);
return;
}
std::shared_ptr<Scene> currentScene = scenes.back();
if (!currentScene)
{
SDL_RenderPresent(this->sdl_renderer);
return;
}
currentScene->render(this);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment