OSDN Git Service
(root)
/
android-x86
/
frameworks-native.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d3b809b
)
EGL: check that display is still valid
author
Jesse Hall
<jessehall@google.com>
Wed, 28 Sep 2016 18:26:57 +0000
(11:26 -0700)
committer
Jesse Hall
<jessehall@google.com>
Wed, 28 Sep 2016 21:30:54 +0000
(14:30 -0700)
Bug:
31522731
Change-Id: I84d82e55aba5b58dfdbcac9e208c36767fbedfd1
opengl/libs/EGL/egl_display.cpp
patch
|
blob
|
history
diff --git
a/opengl/libs/EGL/egl_display.cpp
b/opengl/libs/EGL/egl_display.cpp
index
e335a6c
..
1e39aae
100644
(file)
--- a/
opengl/libs/EGL/egl_display.cpp
+++ b/
opengl/libs/EGL/egl_display.cpp
@@
-66,7
+66,10
@@
egl_display_t::~egl_display_t() {
egl_display_t* egl_display_t::get(EGLDisplay dpy) {
uintptr_t index = uintptr_t(dpy)-1U;
- return (index >= NUM_DISPLAYS) ? NULL : &sDisplay[index];
+ if (index >= NUM_DISPLAYS || !sDisplay[index].isValid()) {
+ return nullptr;
+ }
+ return &sDisplay[index];
}
void egl_display_t::addObject(egl_object_t* object) {