summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceComposerClient.cpp
diff options
context:
space:
mode:
author Valerie Hau <vhau@google.com> 2020-01-08 17:23:21 -0800
committer Valerie Hau <vhau@google.com> 2020-01-08 17:25:44 -0800
commit84d87ffc91d35d41d98d741258c40a367ba503fa (patch)
tree1500167ffb07c0360753d4544ce5654e2562e98f /libs/gui/SurfaceComposerClient.cpp
parenta81d409ce10bc25bd8b3e28f8ef87376d5fa2b5b (diff)
Check for null surface control before setting transform hint
Bug: 147109531 Test: built, boot, libgui_test Change-Id: I4ebe256bfcdc84f1498d545bbba30117a1429e06
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r--libs/gui/SurfaceComposerClient.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 1d887ea931..4b6ffb174d 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -225,9 +225,11 @@ void TransactionCompletedListener::onTransactionCompleted(ListenerStats listener
.surfaceControls[surfaceStats.surfaceControl],
surfaceStats.acquireTime, surfaceStats.previousReleaseFence,
surfaceStats.transformHint);
- callbacksMap[callbackId]
- .surfaceControls[surfaceStats.surfaceControl]
- ->setTransformHint(surfaceStats.transformHint);
+ if (callbacksMap[callbackId].surfaceControls[surfaceStats.surfaceControl]) {
+ callbacksMap[callbackId]
+ .surfaceControls[surfaceStats.surfaceControl]
+ ->setTransformHint(surfaceStats.transformHint);
+ }
}
callbackFunction(transactionStats.latchTime, transactionStats.presentFence,