From 98722773da2ef2a7c6ceab39ce451f46dd7ded6c Mon Sep 17 00:00:00 2001 From: Omar Emara Date: Thu, 31 Oct 2024 13:53:26 +0300 Subject: [PATCH] Revert "Fix: Blender crashes opening a file with compositor" This reverts commit 0a70360eb69fb67b5ca4b6488b79edc507bf1417. That's because it caused issue #129366 which is much more serious, and the cause is not obvious so far. Another fix will be submitted for the original issue. --- source/blender/windowmanager/intern/wm_files.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index 950f2eb2c17..697c6a6ba00 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -386,6 +386,9 @@ static void wm_file_read_setup_wm_use_new(bContext *C, wm->init_flag = 0; wm->winactive = nullptr; + /* Clearing drawable of old WM before deleting any context to avoid clearing the wrong wm. */ + wm_window_clear_drawable(old_wm); + bool has_match = false; LISTBASE_FOREACH (wmWindow *, win, &wm->windows) { LISTBASE_FOREACH (wmWindow *, old_win, &old_wm->windows) { @@ -404,9 +407,6 @@ static void wm_file_read_setup_wm_use_new(bContext *C, static_cast(wm->windows.first)); } - /* Clearing drawable of old WM before deleting any context to avoid clearing the wrong wm. */ - wm_window_clear_drawable(old_wm); - wm_setup_data->old_wm = nullptr; wm_close_and_free(C, old_wm); /* Don't handle user counts as this is only ever called once #G_MAIN has already been freed via