summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhaowei Yuan <zhaowei.yuan@samsung.com>2019-06-19 15:15:38 +0800
committerZhaowei Yuan <zhaowei.yuan@samsung.com>2019-06-19 15:19:38 +0800
commit2dc471b0e167693b81c24c9a3f89b985cb98249f (patch)
tree0a2ddaf65d0f39d2a421ec904e37cb327b6c3ba7
parent560c13e37479db32e4c8cb2f969966c9a6d94791 (diff)
downloadmesa-2dc471b0e167693b81c24c9a3f89b985cb98249f.tar.gz
mesa-2dc471b0e167693b81c24c9a3f89b985cb98249f.tar.bz2
mesa-2dc471b0e167693b81c24c9a3f89b985cb98249f.zip
Variable "stdraw" could be NULL in some case, check it before access. Change-Id: I51daed4b34f97d055363104ff0bf06867ec1374f Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
-rwxr-xr-x[-rw-r--r--]src/mesa/state_tracker/st_manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index 52897dfc1cc..40deb8b71a3 100644..100755
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -1090,8 +1090,8 @@ st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi,
}
#ifdef HAVE_TIZEN_PLATFORM
- if (stdraw->iface->validate_drawable)
- valid = stdraw->iface->validate_drawable(stdraw->iface);
+ if (stdraw && stdraw->iface->validate_drawable)
+ valid = stdraw->iface->validate_drawable(stdraw->iface);
#endif
if (stdraw && stread) {