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.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/rs/rsLocklessFifo.cpp b/libs/rs/rsLocklessFifo.cpp
index 70b7278..7023a1f 100644
--- a/libs/rs/rsLocklessFifo.cpp
+++ b/libs/rs/rsLocklessFifo.cpp
@@ -21,14 +21,16 @@
using namespace android;
using namespace android::renderscript;
-LocklessCommandFifo::LocklessCommandFifo() {
+LocklessCommandFifo::LocklessCommandFifo() : mBuffer(0) {
}
LocklessCommandFifo::~LocklessCommandFifo() {
if (!mInShutdown) {
shutdown();
}
- free(mBuffer);
+ if (mBuffer) {
+ free(mBuffer);
+ }
}
void LocklessCommandFifo::shutdown() {