Exit if application is null in sdl2 backend
This commit is contained in:
parent
f5f094bdc6
commit
bd826103d3
1 changed files with 4 additions and 0 deletions
|
|
@ -36,6 +36,10 @@ int main() try
|
||||||
context.vsync = [&](bool on){ window.vsync(on); };
|
context.vsync = [&](bool on){ window.vsync(on); };
|
||||||
|
|
||||||
auto application = factory->create(options, context);
|
auto application = factory->create(options, context);
|
||||||
|
|
||||||
|
if (!application)
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
application->on_event(app::resize_event{window.size()});
|
application->on_event(app::resize_event{window.size()});
|
||||||
|
|
||||||
window.show();
|
window.show();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue