Fix Object Selection not freeing the object when unhovering

Fixes a double-free on previews.
This commit is contained in:
Silent 2021-10-09 21:48:43 +02:00
parent 15897c23a1
commit 3e64a227e5
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1
1 changed files with 3 additions and 0 deletions

View File

@ -757,7 +757,10 @@ static void window_editor_object_selection_scroll_mouseover(
w->selected_list_item = selectedObject;
if (_loadedObject != nullptr)
{
_loadedObject->Unload();
_loadedObject = nullptr;
}
if (selectedObject == -1)
{