Blender Git Commit Log

Git Commits -> Revision e7ab802

Revision e7ab802 by Hans Goudey (master)
October 15, 2020, 15:08 (GMT)
Fix T81697: Property search crash with python handlers

Previously I used `CTX_copy` to create a mutable copy of the context in
order to set its area and region fields to temporary variables. This was
a tradeoff to avoid casting away `const` for `bContext`.

However, `bpy.context` is set to this new temporary value, which is fine
for a single `wm_draw_update` pass, but in the next main loop,
`bpy.context` is still set to this value, which was freed at the
end of `property_search_all_tabs`. It would be possible to reset the
`bpy.context` variable ath the end of the function, but this patch
contains an alternate solution: just don't copy the context. It looks
like this was the only use of `CTX_copy` anyway, maybe for good reason.

Differential Revision: https://developer.blender.org/D9216

Commit Details:

Full Hash: e7ab802ab04d25532ee16153c55eaac290c877b0
Parent Commit: 15d78ea
Lines Changed: +14, -10

1 Modified Path:

/source/blender/editors/space_buttons/space_buttons.c (+14, -10) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021