libqdutils: Fix crash in checkForGPULayer

* This will be NULL when SF is disabling HWC. Don't crash!

Change-Id: I0b988b0c0f224ef7281dc9049449f3202fce835f
This commit is contained in:
Steve Kondik 2012-10-02 06:32:57 -07:00 committed by andrew.boren
parent 2a02aa1d3d
commit 295b3996ee

View File

@ -38,6 +38,7 @@ bool CBUtils::sGPUlayerpresent = 0;
void CBUtils::checkforGPULayer(const hwc_layer_list_t* list) {
sGPUlayerpresent = false;
if (!list) return;
for(uint32_t index = 0; index < list->numHwLayers; index++) {
const hwc_layer_t* layer = &list->hwLayers[index];
if(layer->compositionType == HWC_FRAMEBUFFER) {