am 7aa0c47e: sf: Add a NULL check in getDisplayConfigs

* commit '7aa0c47e4205c6fca136c38f272d911c25c8a8fa':
  sf: Add a NULL check in getDisplayConfigs
This commit is contained in:
Naseer Ahmed 2014-11-03 22:31:50 +00:00 committed by Android Git Automerger
commit ff520bb938

View File

@ -507,6 +507,9 @@ status_t SurfaceFlinger::getDisplayConfigs(const sp<IBinder>& display,
return BAD_VALUE; return BAD_VALUE;
} }
if (!display.get())
return NAME_NOT_FOUND;
int32_t type = NAME_NOT_FOUND; int32_t type = NAME_NOT_FOUND;
for (int i=0 ; i<DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES ; i++) { for (int i=0 ; i<DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES ; i++) {
if (display == mBuiltinDisplays[i]) { if (display == mBuiltinDisplays[i]) {