Merge pull request #7753 from Robyt3/Client-Assertion-Handler-Crash-Fix

Fix crash in assertion handler after client/graphics destroyed
This commit is contained in:
heinrich5991 2024-01-02 18:42:15 +00:00 committed by GitHub
commit 022cae6f20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4303,6 +4303,8 @@ int main(int argc, const char **argv)
pKernel->RegisterInterface(pClient, false);
pClient->RegisterInterfaces();
CleanerFunctions.emplace([pKernel, pClient]() {
// Ensure that the assert handler doesn't use the client/graphics after they've been destroyed
dbg_assert_set_handler(nullptr);
pKernel->Shutdown();
delete pKernel;
delete pClient;