Browse Source

Platform: gracefully fail GlfwApplication::exec() if no window was opened

Signed-off-by: Squareys <squareys@googlemail.com>
pull/272/head
Squareys 8 years ago
parent
commit
e0c3e5ccfc
  1. 2
      src/Magnum/Platform/GlfwApplication.cpp

2
src/Magnum/Platform/GlfwApplication.cpp

@ -436,6 +436,8 @@ void GlfwApplication::setSwapInterval(const Int interval) {
} }
int GlfwApplication::exec() { int GlfwApplication::exec() {
CORRADE_ASSERT(_window, "Platform::GlfwApplication::exec(): no window opened", {});
while(!glfwWindowShouldClose(_window)) { while(!glfwWindowShouldClose(_window)) {
if(_flags & Flag::Redraw) { if(_flags & Flag::Redraw) {
_flags &= ~Flag::Redraw; _flags &= ~Flag::Redraw;

Loading…
Cancel
Save