mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 20:28:32 +09:00
[Fix] (MG_Impl/Getter): avoid crash when no buffer is bound
This commit is contained in:
@@ -160,9 +160,11 @@ namespace MobileGL {
|
||||
*params = 0; // TODO
|
||||
break;
|
||||
case GL_ARRAY_BUFFER_BINDING: {
|
||||
*params = MG_State::pGLContext->GetBufferBindingSlot(BufferTarget::Vertex)
|
||||
.GetBoundObject()
|
||||
->GetExternalIndex();
|
||||
auto obj = MG_State::pGLContext->GetBufferBindingSlot(BufferTarget::Vertex).GetBoundObject();
|
||||
if (obj)
|
||||
*params = obj->GetExternalIndex();
|
||||
else
|
||||
*params = 0;
|
||||
break;
|
||||
}
|
||||
case GL_BLEND:
|
||||
|
||||
Reference in New Issue
Block a user