hwc: Move max app layer check outside isFrameDoable routine.

Move the condition for checking maximum number of app layers
ourside the isFrameDoable function to avoid heap corruption while
updating hnd array in cacheAll function.

Bug: 24163261

Acked-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>

Change-Id: Id4458fcadc7775a2d78b1849de6782857c6ac17f
1 file changed
tree: 8d2fe13fbf5ec04861cbf734356e5637d03a5c0e
  1. msm8084/
  2. msm8226/
  3. msm8960/
  4. msm8974/
  5. Android.mk