commit | 32ba98626834cb77e5d14b3e419385f0e32ec0bc | [log] [tgz] |
---|---|---|
author | Yunlian Jiang <yunlian@google.com> | Tue Jan 31 15:55:00 2017 -0800 |
committer | Yunlian Jiang <yunlian@google.com> | Wed Feb 01 00:44:06 2017 +0000 |
tree | 45f64b266d374bf82354dd2c60873e930988c329 | |
parent | a1ee4c28facd2e4ae0eb288178c8988bf1806148 [diff] [blame] |
Fix warning: Dereference of null pointer. Bug: None Test: The warning is gone. Change-Id: I4c08397c0ee18c7714eb9b1029844d427259907b
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index a248912..1b39e22 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp
@@ -1878,7 +1878,7 @@ config->channel_mask, flags); - if (*devices == AUDIO_DEVICE_NONE) { + if (devices == NULL || *devices == AUDIO_DEVICE_NONE) { return BAD_VALUE; }