summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-06-23 00:27:39 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-06-23 00:27:39 +0000
commit402bbb4a570644c0f0a5cac6c6740db34e759f0b (patch)
treefc33b34e32328391564e33888d6dc5ca551c5a9f
parent4524ce518978310b58ccb13c1fc7438f7c71819c (diff)
parent34ed4d4d74ce45e58e3934d472f28617d9b34296 (diff)
downloadnative-402bbb4a570644c0f0a5cac6c6740db34e759f0b.tar.gz
Merge "Ensure connection is non-null" into rvc-dev
-rw-r--r--services/inputflinger/dispatcher/InputDispatcher.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp
index 3865f2960e..f011992daa 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.cpp
+++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -717,7 +717,7 @@ bool InputDispatcher::shouldPruneInboundQueueLocked(const MotionEntry& motionEnt
for (TouchedMonitor& gestureMonitor : gestureMonitors) {
sp<Connection> connection =
getConnectionLocked(gestureMonitor.monitor.inputChannel->getConnectionToken());
- if (connection->responsive) {
+ if (connection != nullptr && connection->responsive) {
// This monitor could take more input. Drop all events preceding this
// event, so that gesture monitor could get a chance to receive the stream
ALOGW("Pruning the input queue because %s is unresponsive, but we have a "