From ba7e965316b24abcdce9741c4e276adfcdaba1fe Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 23 Jan 2019 10:33:41 -0800 Subject: Don't create RenderThread for dumpsys gfxinfo Change-Id: I4cbad14ad6f952ddec11eb732701909fd75ff137 Fixes: 121129527 Test: guess --- libs/hwui/renderthread/RenderProxy.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp index aa6af23d8ed3..23a0a2b053ed 100644 --- a/libs/hwui/renderthread/RenderProxy.cpp +++ b/libs/hwui/renderthread/RenderProxy.cpp @@ -244,8 +244,10 @@ uint32_t RenderProxy::frameTimePercentile(int percentile) { } void RenderProxy::dumpGraphicsMemory(int fd) { - auto& thread = RenderThread::getInstance(); - thread.queue().runSync([&]() { thread.dumpGraphicsMemory(fd); }); + if (RenderThread::hasInstance()) { + auto& thread = RenderThread::getInstance(); + thread.queue().runSync([&]() { thread.dumpGraphicsMemory(fd); }); + } } void RenderProxy::setProcessStatsBuffer(int fd) { -- cgit v1.2.3-59-g8ed1b