libvulkan: add a nullptr check for ANativeWindow*

When VK_GOOGLE_display_timing extension is in use, if the swapchain is
not in active status, during vkDestroySwapchainKHR, a nullptr checker
for the ANativeWindow* is missing and that will cause a crashing when
calling window api with window being nullptr. This change just adds a
nullptr check for that ANativeWindow*.

Bug: 134185757
Test: manual
Change-Id: Ica4543666c4aadc0a4d9a6caddaefd4ab08f8627
Merged-In: Ic8a4baf7e219cc8e1fb3838d4e4b710b242efa9c
1 file changed