# HG changeset patch # User Benjamin Golinvaux # Date 1565096813 -7200 # Node ID 2db3ef713664e1b9f0ac7ac037a1c222fb114f34 # Parent 8b9bc91eda6b7c3c1a91c39c61994a0e1667708d Fixed error handling for WebGL context creation diff -r 8b9bc91eda6b -r 2db3ef713664 Framework/OpenGL/WebAssemblyOpenGLContext.cpp --- a/Framework/OpenGL/WebAssemblyOpenGLContext.cpp Mon Aug 05 12:28:38 2019 +0200 +++ b/Framework/OpenGL/WebAssemblyOpenGLContext.cpp Tue Aug 06 15:06:53 2019 +0200 @@ -49,7 +49,7 @@ emscripten_webgl_init_context_attributes(&attr); context_ = emscripten_webgl_create_context(canvas.c_str(), &attr); - if (context_ < 0) + if (context_ == 0) { std::string message("Cannot create an OpenGL context for canvas: "); message += canvas;