summaryrefslogtreecommitdiff
path: root/rsContext.cpp
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2014-04-17 23:33:58 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-04-17 23:33:58 +0000
commitb429ee5950a4154e58c8ff9d769b3861844bc994 (patch)
tree7c6ef1392859993405c35eb58c2eeaee6c7d5f58 /rsContext.cpp
parentba1b9cbd5d0b43d01834a494b48d0559e21fabe1 (diff)
parentfea96e8d145b1915b7bd66f68e973dd572a469e3 (diff)
downloadrs-b429ee5950a4154e58c8ff9d769b3861844bc994.tar.gz
Merge "Add error check when init RS thread in sync mode."
Diffstat (limited to 'rsContext.cpp')
-rw-r--r--rsContext.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/rsContext.cpp b/rsContext.cpp
index 290a0909..878daa11 100644
--- a/rsContext.cpp
+++ b/rsContext.cpp
@@ -580,6 +580,11 @@ bool Context::initContext(Device *dev, const RsSurfaceConfig *sc) {
timerSet(RS_TIMER_INTERNAL);
if (mSynchronous) {
threadProc(this);
+
+ if (mError != RS_ERROR_NONE) {
+ ALOGE("Errors during thread init (sync mode)");
+ return false;
+ }
} else {
status = pthread_create(&mThreadId, &threadAttr, threadProc, this);
if (status) {
@@ -613,7 +618,7 @@ Context::~Context() {
}
rsAssert(mExit);
- if (mHal.funcs.shutdownDriver) {
+ if (mHal.funcs.shutdownDriver && mHal.drv) {
mHal.funcs.shutdownDriver(this);
}