summaryrefslogtreecommitdiffstats
path: root/opengl/libs/EGL/egl_display.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'opengl/libs/EGL/egl_display.cpp')
-rw-r--r--opengl/libs/EGL/egl_display.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp
index 558ca77..2935832 100644
--- a/opengl/libs/EGL/egl_display.cpp
+++ b/opengl/libs/EGL/egl_display.cpp
@@ -62,11 +62,13 @@ void egl_display_t::removeObject(egl_object_t* object) {
objects.remove(object);
}
-bool egl_display_t::getObject(egl_object_t* object) {
+bool egl_display_t::getObject(egl_object_t* object) const {
Mutex::Autolock _l(lock);
if (objects.indexOf(object) >= 0) {
- object->incRef();
- return true;
+ if (object->getDisplay() == this) {
+ object->incRef();
+ return true;
+ }
}
return false;
}