mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:47:34 +00:00
LibGL: Support missing context in glGetError
and glGetIntegerv
In its current state, ScummVM seems to invoke these methods just after destroying the current GL context. According to the OpenGL spec: "Issuing GL commands when the program does not have a current context results in undefined behavior, up to and including program termination." Our old behavior was to deref a `nullptr`, which isn't that great. For now, protect these two methods. If other ports seem to misbehave as well, we can always expand the check to other methods.
This commit is contained in:
parent
a06b69c5b5
commit
b79642ef74
3 changed files with 13 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "GLContext.h"
|
||||
#include "SoftwareGLContext.h"
|
||||
#include <LibGfx/Bitmap.h>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue