Fix #104726: Allow loading of 2.48 file without active window #105225

Merged
Harley Acheson merged 2 commits from Harley/blender:Wm248 into main 2023-02-28 17:08:41 +01:00
Member

Add check to WM_check for lack of wmWindowManager->winactive. Sets it
if there is a window and makes that one wmWindow->active as well.


#104726 includes files made in Blender 2.48 that crash on loading if loaded directly via commandline, but load correctly
via the UI. Blend files created prior to 2.5 do not have a wmWindowManager. It therefore has to be created in some way that makes sense for the rest of the file. In these files we get to WM_check with a valid wmWindowManager that has a single window in its windows list, but that window is not set valid. The null wmWindowManager->winactive gets sent along and we crash.

This PR just adds a check for this condition and sets the first window as wmWindowManager->winactive and also sets its wmWindow->active to true.

Add check to WM_check for lack of wmWindowManager->winactive. Sets it if there is a window and makes that one wmWindow->active as well. --- #104726 includes files made in Blender 2.48 that crash on loading if loaded directly via commandline, but load correctly via the UI. Blend files created prior to 2.5 do not have a wmWindowManager. It therefore has to be created in some way that makes sense for the rest of the file. In these files we get to `WM_check` with a valid wmWindowManager that has a single window in its windows list, but that window is not set valid. The null wmWindowManager->winactive gets sent along and we crash. This PR just adds a check for this condition and sets the first window as wmWindowManager->winactive and also sets its wmWindow->active to true.
Harley Acheson added 1 commit 2023-02-26 20:38:17 +01:00
Add check to WM_check for lack of wmWindowManager->winactive. Sets one
if there is a window and makes that one wmWindow->active as well.
Harley Acheson requested review from Campbell Barton 2023-02-26 20:41:28 +01:00
Brecht Van Lommel approved these changes 2023-02-28 13:29:13 +01:00
Harley Acheson added 1 commit 2023-02-28 16:41:40 +01:00
Merge branch 'main' into Wm248
All checks were successful
buildbot/vexp-code-patch-coordinator Build done.
709ac49e1c
Author
Member

@blender-bot build

@blender-bot build
Harley Acheson merged commit 480e467ac9 into main 2023-02-28 17:08:41 +01:00
Harley Acheson deleted branch Wm248 2023-02-28 17:08:42 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#105225
No description provided.