File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -262,7 +262,7 @@ void* Loader::open(egl_connection_t* cnx) {
262262 hnd = attempt_to_load_updated_driver (cnx);
263263
264264 // If updated driver apk is set but fail to load, abort here.
265- LOG_ALWAYS_FATAL_IF (android::GraphicsEnv::getInstance ().getDriverNamespace (),
265+ LOG_ALWAYS_FATAL_IF (android::GraphicsEnv::getInstance ().getDriverNamespace () && !hnd ,
266266 " couldn't find an OpenGL ES implementation from %s" ,
267267 android::GraphicsEnv::getInstance ().getDriverPath ().c_str ());
268268 }
Original file line number Diff line number Diff line change @@ -339,10 +339,13 @@ void Hal::UnloadBuiltinDriver() {
339339
340340 ALOGD (" Unload builtin Vulkan driver." );
341341
342- // Close the opened device
343- int err = hal_.dev_ ->common .close (
344- const_cast <struct hw_device_t *>(&hal_.dev_ ->common ));
345- ALOG_ASSERT (!err, " hw_device_t::close() failed." );
342+ if (hal_.dev_ ->common .close != nullptr )
343+ {
344+ // Close the opened device
345+ int err = hal_.dev_ ->common .close (
346+ const_cast <struct hw_device_t *>(&hal_.dev_ ->common ));
347+ ALOG_ASSERT (!err, " hw_device_t::close() failed." );
348+ }
346349
347350 // Close the opened shared library in the hw_module_t
348351 android_unload_sphal_library (hal_.dev_ ->common .module ->dso );
You can’t perform that action at this time.
0 commit comments