Page MenuHome

Fix T93949: Preview Image Error When No Screen
ClosedPublic

Authored by Harley Acheson (harley) on Dec 14 2021, 6:00 PM.

Details

Summary

Fix an error if "File Preview Type" is "Auto" and there is no screen.


T93949 Illustrates that it is possible to script the saving of a file when the context has no screen. This results in an error in BKE_screen_find_big_area. This fixes that by checking for screen.

Diff Detail

Repository
rB Blender

Event Timeline

Julian Eisel (Severin) requested changes to this revision.Dec 14 2021, 6:35 PM
Julian Eisel (Severin) added inline comments.
source/blender/windowmanager/intern/wm_files.c
1823

I'd rather have a variable and avoid calling CTX_wm_screen(C) twice. Not a big deal, but it does some unnecessary work, possibly including a Python dictionary lookup.

This revision now requires changes to proceed.Dec 14 2021, 6:35 PM

@Julian Eisel (Severin) I'd rather have a variable and avoid calling CTX_wm_screen(C) twice...

Of course you are right. I actually thought about this at first and then got lazy. LOL.

Fixed.

This revision is now accepted and ready to land.Dec 14 2021, 10:00 PM