diff --git a/src/backend.cpp b/src/backend.cpp index d07f847ba6..a15e0e5051 100644 --- a/src/backend.cpp +++ b/src/backend.cpp @@ -26,9 +26,10 @@ namespace gamescope bool IBackend::Set( IBackend *pBackend ) { - if ( s_pBackend ) { - GetBackend()->IBackend::~IBackend(); - } + //FIXME: calling the backend's destructor sometimes hangs gamescope for wayland backend + //if ( s_pBackend ) { + // std::destroy_at(GetBackend()); + //} if ( pBackend ) { diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp index e0feba9bd7..556c811baa 100644 --- a/src/steamcompmgr.cpp +++ b/src/steamcompmgr.cpp @@ -5951,15 +5951,14 @@ steamcompmgr_exit(std::optional> lock = std::nullop s_MuraCTMBlob[i] = nullptr; } } - + if (lock) + lock->unlock(); gamescope::IBackend::Set( nullptr ); wlserver_lock(); wlserver_shutdown(); wlserver_unlock(false); - if (lock) - lock->unlock(); pthread_exit(NULL); }