diff --git a/src/SFML/Window/Window.cpp b/src/SFML/Window/Window.cpp index 1ca045459..d28fd0e62 100644 --- a/src/SFML/Window/Window.cpp +++ b/src/SFML/Window/Window.cpp @@ -34,6 +34,8 @@ #include +#include + namespace sf { @@ -90,6 +92,7 @@ void Window::create(VideoMode mode, const String& title, std::uint32_t style, co if (!mode.isValid()) { err() << "The requested video mode is not available, switching to a valid mode" << std::endl; + assert(!VideoMode::getFullscreenModes().empty() && "No video modes available"); mode = VideoMode::getFullscreenModes()[0]; }