Readd missing null check

Test: adb shell am instrument -w -r
android.test.appsmoke/android.support.test.runner.AndroidJUnitRunner

Change-Id: I8f7c325cf73805ed7137792479f5f348c74f85e4
Fixes: 34333370
(cherry picked from commit 9f9d61fd6c16a9750bda19a0d0ebac1209d25ffd)
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 73bf3dc..47003fa 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -2112,6 +2112,9 @@
             boolean wallpaperOnly, boolean includeDecor) {
         Bitmap bitmap = screenshotApplications(appToken, width, height, includeFullDisplay,
                 frameScale, wallpaperOnly, includeDecor, SurfaceControl::screenshot);
+        if (bitmap == null) {
+            return null;
+        }
 
         if (DEBUG_SCREENSHOT) {
             // TEST IF IT's ALL BLACK