From bd826103d3ca8878f6ffd5ee534c827e55db3146 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Fri, 21 Jul 2023 01:30:12 +0300 Subject: [PATCH] Exit if application is null in sdl2 backend --- libs/sdl2/source/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/sdl2/source/main.cpp b/libs/sdl2/source/main.cpp index cd1a5592..8aa08554 100644 --- a/libs/sdl2/source/main.cpp +++ b/libs/sdl2/source/main.cpp @@ -36,6 +36,10 @@ int main() try context.vsync = [&](bool on){ window.vsync(on); }; auto application = factory->create(options, context); + + if (!application) + return EXIT_FAILURE; + application->on_event(app::resize_event{window.size()}); window.show();