Merge "SurfaceFlinger: Fix null pointer exception"

This commit is contained in:
Dan Stoza 2015-03-09 18:00:28 +00:00 committed by Gerrit Code Review
commit 3949f664c7

View File

@ -617,7 +617,11 @@ status_t SurfaceFlinger::getDisplayStats(const sp<IBinder>& /* display */,
}
int SurfaceFlinger::getActiveConfig(const sp<IBinder>& display) {
return getDisplayDevice(display)->getActiveConfig();
sp<DisplayDevice> device(getDisplayDevice(display));
if (device != NULL) {
return device->getActiveConfig();
}
return BAD_VALUE;
}
void SurfaceFlinger::setActiveConfigInternal(const sp<DisplayDevice>& hw, int mode) {