diff options
author | spang <spang@chromium.org> | 2015-07-30 06:48:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-30 13:49:27 +0000 |
commit | 925d5741f1cd7fcf6b99825ffc7dae0e36e95181 (patch) | |
tree | 1c5f3f4a25ff864769beea691ef2fa9d629b8457 /ash | |
parent | 16948129d41ec7291b128f5d358116d973c1e2f9 (diff) | |
download | chromium_src-925d5741f1cd7fcf6b99825ffc7dae0e36e95181.zip chromium_src-925d5741f1cd7fcf6b99825ffc7dae0e36e95181.tar.gz chromium_src-925d5741f1cd7fcf6b99825ffc7dae0e36e95181.tar.bz2 |
ash: Don't crash associating touchscreens if there's no internal display
This fixes a null pointer dereference in AssociateTouchscreens() since
45f6aaf ("ash: Support multiple touch input devices per display");
BUG=515201
Review URL: https://codereview.chromium.org/1270453002
Cr-Commit-Position: refs/heads/master@{#341107}
Diffstat (limited to 'ash')
-rw-r--r-- | ash/touch/touchscreen_util.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ash/touch/touchscreen_util.cc b/ash/touch/touchscreen_util.cc index 8242c4b..fddf6e4 100644 --- a/ash/touch/touchscreen_util.cc +++ b/ash/touch/touchscreen_util.cc @@ -27,7 +27,8 @@ void AssociateTouchscreens(std::vector<DisplayInfo>* displays, std::set<int> no_match_touchscreen; for (size_t i = 0; i < devices.size(); ++i) { - if (devices[i].type == ui::InputDeviceType::INPUT_DEVICE_INTERNAL) { + if (internal_state && + devices[i].type == ui::InputDeviceType::INPUT_DEVICE_INTERNAL) { VLOG(2) << "Found internal device for display " << internal_state->id() << " with device id " << devices[i].id << " size " << devices[i].size.ToString(); |