Add missing null pointer check for Bluetooth A2DP Codec Settings

Bug: 34885602
Test: Code compilation
Change-Id: I13443390e7c6ffa34b5957a588fc0cefdf5b80f5
(cherry picked from commit 789d21d475a9e3fa494fb7e171bb70d3cbb566ae)
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index abf0154..1649e51 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -1805,9 +1805,11 @@
         synchronized (mBluetoothA2dpLock) {
             if (mBluetoothA2dp != null) {
                 codecStatus = mBluetoothA2dp.getCodecStatus();
-                codecConfig = codecStatus.getCodecConfig();
-                codecsLocalCapabilities = codecStatus.getCodecsLocalCapabilities();
-                codecsSelectableCapabilities = codecStatus.getCodecsSelectableCapabilities();
+                if (codecStatus != null) {
+                    codecConfig = codecStatus.getCodecConfig();
+                    codecsLocalCapabilities = codecStatus.getCodecsLocalCapabilities();
+                    codecsSelectableCapabilities = codecStatus.getCodecsSelectableCapabilities();
+                }
             }
         }
         if (codecConfig == null)