diff options
author | Tim Murray <timmurray@google.com> | 2014-04-17 23:33:58 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-04-17 23:33:58 +0000 |
commit | b429ee5950a4154e58c8ff9d769b3861844bc994 (patch) | |
tree | 7c6ef1392859993405c35eb58c2eeaee6c7d5f58 /rsContext.cpp | |
parent | ba1b9cbd5d0b43d01834a494b48d0559e21fabe1 (diff) | |
parent | fea96e8d145b1915b7bd66f68e973dd572a469e3 (diff) | |
download | rs-b429ee5950a4154e58c8ff9d769b3861844bc994.tar.gz |
Merge "Add error check when init RS thread in sync mode."
Diffstat (limited to 'rsContext.cpp')
-rw-r--r-- | rsContext.cpp | 7 |
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); } |