diff options
-rw-r--r-- | source/blender/modifiers/intern/MOD_nodes.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index 607b05d39b0..d808052e5f5 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -1074,8 +1074,11 @@ static void reset_tree_ui_storage(Span<const blender::nodes::NodeTreeRef *> tree static Vector<SpaceSpreadsheet *> find_spreadsheet_editors(Main *bmain) { - Vector<SpaceSpreadsheet *> spreadsheets; wmWindowManager *wm = (wmWindowManager *)bmain->wm.first; + if (wm == nullptr) { + return {}; + } + Vector<SpaceSpreadsheet *> spreadsheets; LISTBASE_FOREACH (wmWindow *, window, &wm->windows) { bScreen *screen = BKE_workspace_active_screen_get(window->workspace_hook); LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { |