Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9d24d07 authored by Yunlian Jiang's avatar Yunlian Jiang Committed by George Burgess IV
Browse files

fix warning: Dereference of null pointer

This fixes the static analyzer warning
warning: Dereference of null pointer (loaded from variable 'devices')

Bug: None
Test: The warning is gone.
Change-Id: If0d2649bf0a90a403013c4af1b94814357b792c2
parent 76321a33
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1908,7 +1908,7 @@ status_t AudioFlinger::openOutput(audio_module_handle_t module,
              config->channel_mask,
              flags);

    if (*devices == AUDIO_DEVICE_NONE) {
    if (devices == NULL || *devices == AUDIO_DEVICE_NONE) {
        return BAD_VALUE;
    }