diff options
| author | 2013-06-11 14:09:41 -0700 | |
|---|---|---|
| committer | 2013-06-11 14:09:41 -0700 | |
| commit | 8cb26c099dc6357340141c9d81a1131ee404ae41 (patch) | |
| tree | a4b72ff6316a1dce574270eebef8fbb0f5cfbcb0 | |
| parent | 0a2ff8db4339261d701ad542ac770fb92bf2127b (diff) | |
| parent | cb5d644fb8956962b6a89f8d384b16819af5fdf9 (diff) | |
am cb5d644f: Merge "Workaround possible use after delete" into jb-mr2-dev
* commit 'cb5d644fb8956962b6a89f8d384b16819af5fdf9':
Workaround possible use after delete
| -rw-r--r-- | libs/hwui/DisplayList.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/DisplayList.cpp b/libs/hwui/DisplayList.cpp index 648da9cb378d..1cbd53196861 100644 --- a/libs/hwui/DisplayList.cpp +++ b/libs/hwui/DisplayList.cpp @@ -63,6 +63,7 @@ void DisplayList::destroyDisplayListDeferred(DisplayList* displayList) { void DisplayList::clearResources() { mDisplayListData = NULL; + mSize = 0; // TODO: shouldn't be needed, WAR possible use after delete mClipRectOp = NULL; mSaveLayerOp = NULL; @@ -479,7 +480,7 @@ void DisplayList::replay(ReplayStateStruct& replayStruct, const int level) { */ template <class T> void DisplayList::iterate(OpenGLRenderer& renderer, T& handler, const int level) { - if (mSize == 0 || mAlpha <= 0) { + if (mSize == 0 || mAlpha <= 0 || CC_UNLIKELY(!mSaveOp)) { // TODO: shouldn't need mSaveOp check DISPLAY_LIST_LOGD("%*sEmpty display list (%p, %s)", level * 2, "", this, mName.string()); return; } |