feat: attempt to prevent some plugin disposal crashes by stopping Framework::Update event dispatching before unloading

This commit is contained in:
goat 2021-04-20 22:01:17 +02:00
parent 35d88ac554
commit de98b75336
No known key found for this signature in database
GPG key ID: F18F057873895461
2 changed files with 42 additions and 31 deletions

View file

@ -358,6 +358,10 @@ namespace Dalamud
{
try
{
// this must be done before unloading plugins, to prevent crashes due to errors
// in plugin cleanup
this.Framework.DispatchUpdateEvents = false;
// this must be done before unloading plugins, or it can cause a race condition
// due to rendering happening on another thread, where a plugin might receive
// a render call after it has been disposed, which can crash if it attempts to