summaryrefslogtreecommitdiff
path: root/libs/rs/rsObjectBase.cpp
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2010-09-28 15:45:45 -0700
committerStephen Hines <srhines@google.com>2010-09-29 16:58:17 -0700
commit01f0ad7c13b8878c2167bff10ea875d7509edca5 (patch)
treea23bced149e474da62c7da992015a5e3163486f9 /libs/rs/rsObjectBase.cpp
parent3ebb1ba50c9b98e5303eb21ed6fa488c3f9bd632 (diff)
Fix clear() operation for rsScriptC.
- This removes a memory leak where some elements were not getting tracked properly (and then triggering an assert when a context is destroyed). - Convert ScriptCState to use a tracked object reference for mScript. - Add a missing clear to FontState. - Clean up synchronization in RSTest so that our graphics context outlives any subtest context. Change-Id: I0d5768c4d2f8810dd1ae2f68b1edd7e150f382fd
Diffstat (limited to 'libs/rs/rsObjectBase.cpp')
-rw-r--r--libs/rs/rsObjectBase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/rs/rsObjectBase.cpp b/libs/rs/rsObjectBase.cpp
index 48f1feed163c..713d61e0b430 100644
--- a/libs/rs/rsObjectBase.cpp
+++ b/libs/rs/rsObjectBase.cpp
@@ -61,6 +61,7 @@ void ObjectBase::setContext(Context *rsc)
if (mRSC) {
remove();
}
+ rsAssert(rsc);
mRSC = rsc;
if (rsc) {
add();