From 2f944482ece3aba2068ac71cd9c5067e4bc8424c Mon Sep 17 00:00:00 2001 From: John Reck Date: Mon, 27 Mar 2017 14:34:28 -0700 Subject: Add missing assert that task isn't queued MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Probably won't fix anything but this assert is in queue() but not queueAtFront() and inserting a task twice is Really Bad. Bug: 36139852 Test: ¯\_(ツ)_/¯ Change-Id: Ida0f829eecfdd46c17c36b816528c49d12b7cf29 --- libs/hwui/renderthread/RenderThread.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'libs/hwui/renderthread') diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp index e32fd63e1125..1450ec98dabf 100644 --- a/libs/hwui/renderthread/RenderThread.cpp +++ b/libs/hwui/renderthread/RenderThread.cpp @@ -98,6 +98,7 @@ void TaskQueue::queue(RenderTask* task) { } void TaskQueue::queueAtFront(RenderTask* task) { + LOG_ALWAYS_FATAL_IF(task->mNext || mHead == task, "Task is already in the queue!"); if (mTail) { task->mNext = mHead; mHead = task; -- cgit v1.2.3-59-g8ed1b