summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger
diff options
context:
space:
mode:
authorNaseer Ahmed <naseer@codeaurora.org>2014-11-03 22:31:50 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-03 22:31:50 +0000
commitff520bb93812f9892da526ace81efce9b0872503 (patch)
tree228fadc48955dc31c38f9adedfa63047c59e37cb /services/surfaceflinger
parent54430ca2a88f57c709ea2924ea0b78820ae62643 (diff)
parent7aa0c47e4205c6fca136c38f272d911c25c8a8fa (diff)
downloadframeworks_native-ff520bb93812f9892da526ace81efce9b0872503.zip
frameworks_native-ff520bb93812f9892da526ace81efce9b0872503.tar.gz
frameworks_native-ff520bb93812f9892da526ace81efce9b0872503.tar.bz2
am 7aa0c47e: sf: Add a NULL check in getDisplayConfigs
* commit '7aa0c47e4205c6fca136c38f272d911c25c8a8fa': sf: Add a NULL check in getDisplayConfigs
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 0645a86..77fc347 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -507,6 +507,9 @@ status_t SurfaceFlinger::getDisplayConfigs(const sp<IBinder>& display,
return BAD_VALUE;
}
+ if (!display.get())
+ return NAME_NOT_FOUND;
+
int32_t type = NAME_NOT_FOUND;
for (int i=0 ; i<DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES ; i++) {
if (display == mBuiltinDisplays[i]) {