vk-unittest: fix crash when unloading shared lib twice

We explicitly call Driver::unload, but so does the dtor. We just needed to clear the dll member after unloading. Bug: b/177624844 Change-Id: If587df197c2e6242892e41e715885a92167730a7 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52752 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent a421556a
......@@ -153,6 +153,8 @@ void Driver::unload()
dlclose(dll);
#endif
dll = nullptr;
#define VK_GLOBAL(N, R, ...) N = nullptr
#include "VkGlobalFuncs.hpp"
#undef VK_GLOBAL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment