libhwc2.1: fix null pointer crash in setupHWResource

mainDisp could be null if all displays are OFF. This could happen when
the client is destoyed after setting all displays to OFF.

Bug: 304976052
Test: atest VtsHalGraphicsComposer3_TargetTest
Change-Id: I3a3687d1681a5b61d207aaf4c1212b058b9cf704
1 file changed