aboutsummaryrefslogtreecommitdiffstats
path: root/emulator/opengl/host/libs/Translator/GLcommon/FramebufferData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'emulator/opengl/host/libs/Translator/GLcommon/FramebufferData.cpp')
-rw-r--r--emulator/opengl/host/libs/Translator/GLcommon/FramebufferData.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/emulator/opengl/host/libs/Translator/GLcommon/FramebufferData.cpp b/emulator/opengl/host/libs/Translator/GLcommon/FramebufferData.cpp
index c923bfc..2e35c8d 100644
--- a/emulator/opengl/host/libs/Translator/GLcommon/FramebufferData.cpp
+++ b/emulator/opengl/host/libs/Translator/GLcommon/FramebufferData.cpp
@@ -52,7 +52,10 @@ void FramebufferData::setAttachment(GLenum attachment,
ObjectDataPtr obj,
bool takeOwnership) {
int idx = attachmentPointIndex(attachment);
-
+ if (!name) {
+ detachObject(idx);
+ return;
+ }
if (m_attachPoints[idx].target != target ||
m_attachPoints[idx].name != name ||
m_attachPoints[idx].obj.Ptr() != obj.Ptr() ||