Commit: 7c532601090c6e5a09484a0f8a39467856a8d6f4
Author: Bastien Montagne
Date: Mon Sep 26 09:49:34 2016 +0200
Branches: master
https://developer.blender.org/rB7c532601090c6e5a09484a0f8a39467856a8d6f4
Fix crash in own recent rB776a8548f03a049.
New ID may be null, have to check this too!
Reported by @panzergame over IRC, thanks.
To be ported to 2.78 as well.
===================================================================
M source/blender/blenkernel/intern/sca.c
===================================================================
diff --git a/source/blender/blenkernel/intern/sca.c
b/source/blender/blenkernel/intern/sca.c
index c357b2e..61aa8c7 100644
--- a/source/blender/blenkernel/intern/sca.c
+++ b/source/blender/blenkernel/intern/sca.c
@@ -666,15 +666,16 @@ void set_sca_new_poins(void)
* ...and forces us to add yet another very ugly hack to get remapping
with logic bricks working. */
void BKE_sca_logic_links_remap(Main *bmain, Object *ob_old, Object *ob_new)
{
+ if (ob_new == NULL || (ob_old->controllers.first == NULL &&
ob_old->actuators.first == NULL)) {
+ /* Nothing to do here... */
+ return;
+ }
+
GHash *controllers_map = ob_old->controllers.first ?
BLI_ghash_ptr_new_ex(__func__,
BLI_listbase_count(&ob_old->controllers)) : NULL;
GHash *actuators_map = ob_old->actuators.first ?
BLI_ghash_ptr_new_ex(__func__,
BLI_listbase_count(&ob_old->actuators)) : NULL;
- if (!(controllers_map || actuators_map)) {
- return;
- }
-
/* We try to remap old controllers/actuators to new ones - in a very
basic way. */
for (bController *cont_old = ob_old->controllers.first, *cont_new =
ob_new->controllers.first;
cont_old;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs