diff options
author | 2024-08-06 01:10:46 +0000 | |
---|---|---|
committer | 2024-08-06 01:10:46 +0000 | |
commit | 5a2065886bd0276780ad744e6fb1e3249dbd6f91 (patch) | |
tree | 0cdbca211e5b64a515b454d0a001cce5757d5839 /vulkan/libvulkan/driver.cpp | |
parent | 37961ec0f6ed2fa2984484d0d4ddd9dfa4030192 (diff) | |
parent | 189318d74a8b7ce74dbc76ec4d614e369d22a00a (diff) |
Merge changes I1e6c3c80,I4310618c into main
* changes:
Fix updatable driver loading issue with Vulkan.
Fix updatable driver loading issue with EGL.
Diffstat (limited to 'vulkan/libvulkan/driver.cpp')
-rw-r--r-- | vulkan/libvulkan/driver.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp index 81fd1185b6..e9204ab65a 100644 --- a/vulkan/libvulkan/driver.cpp +++ b/vulkan/libvulkan/driver.cpp @@ -339,10 +339,13 @@ void Hal::UnloadBuiltinDriver() { ALOGD("Unload builtin Vulkan driver."); - // Close the opened device - int err = hal_.dev_->common.close( - const_cast<struct hw_device_t*>(&hal_.dev_->common)); - ALOG_ASSERT(!err, "hw_device_t::close() failed."); + if (hal_.dev_->common.close != nullptr) + { + // Close the opened device + int err = hal_.dev_->common.close( + const_cast<struct hw_device_t*>(&hal_.dev_->common)); + ALOG_ASSERT(!err, "hw_device_t::close() failed."); + } // Close the opened shared library in the hw_module_t android_unload_sphal_library(hal_.dev_->common.module->dso); |