summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsLocklessFifo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/rs/rsLocklessFifo.cpp')
-rw-r--r--libs/rs/rsLocklessFifo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/rs/rsLocklessFifo.cpp b/libs/rs/rsLocklessFifo.cpp
index 02a76ab..4d02269 100644
--- a/libs/rs/rsLocklessFifo.cpp
+++ b/libs/rs/rsLocklessFifo.cpp
@@ -21,11 +21,11 @@
using namespace android;
using namespace android::renderscript;
-LocklessCommandFifo::LocklessCommandFifo() : mBuffer(0) {
+LocklessCommandFifo::LocklessCommandFifo() : mBuffer(0), mInitialized(false) {
}
LocklessCommandFifo::~LocklessCommandFifo() {
- if (!mInShutdown) {
+ if (!mInShutdown && mInitialized) {
shutdown();
}
if (mBuffer) {
@@ -58,6 +58,7 @@ bool LocklessCommandFifo::init(uint32_t sizeInBytes) {
mGet = mBuffer;
mEnd = mBuffer + (sizeInBytes) - 1;
//dumpState("init");
+ mInitialized = true;
return true;
}