Blender Git Commit Log
Git Commits -> Revision c028b59
Revision c028b59 by Bastien Montagne (master) September 9, 2015, 14:36 (GMT) |
Fix (unreported) crash with undo/outliner and drivers. To reproduce the crash: * Add some shapekeys to default cube. * Add at least on driver (can be default empty one) to a shapekey value. * **Make this driver visible in Outliner**. * Delete all shapekeys. * Undo. * Crash. Root of the issue is outliner reading code in `blo_lib_link_screen_restore()`, which would try to `restore_pointer_by_name()` for all `TreeStoreElement->id` pointers. Thing is, those id pointers are not always IDs, they can be animdata, sequence, RNA struct/property... That's really not so great design, but also has reasons like size of the struct, we have to live with it. So now: * TreeStoreElement->type defines are braught back into DNA. * There we also define a `TSE_IS_REAL_ID` macro to check whether a given TreeStoreElement actually stores an ID pointer or not. * And in Outliner read code we only try to retore pointers by name for actual ID ones, and set the others to default NULL value. Also, added clear comment to TSE types that do not store a real ID pointer! |
Commit Details:
Full Hash: c028b5980bc2db662a67b9c7e9c5743b4d5a72e5
Parent Commit: 12e4103
Lines Changed: +56, -43