Initialize Event object

This commit is contained in:
Patricia Aas 2021-06-22 10:28:23 +02:00 committed by Patricia Aas
parent 1fb5f23885
commit 9ca1f6f12d
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ void Canvas::render() {
}
std::optional<sf::Event> Canvas::pollEvent() {
sf::Event event;
sf::Event event{};
if (window.pollEvent(event))
return event;
return std::nullopt;