[Bf-blender-cvs] [8c87e681a50] blender2.8: Fix driver expression bytecode validation crash if parsing fails.

Alexander Gavrilov noreply at git.blender.org
Sun Sep 16 09:47:12 CEST 2018


Commit: 8c87e681a500b54cc927220b5791ca5db4b8de48
Author: Alexander Gavrilov
Date:   Sun Sep 16 10:46:28 2018 +0300
Branches: blender2.8
https://developer.blender.org/rB8c87e681a500b54cc927220b5791ca5db4b8de48

Fix driver expression bytecode validation crash if parsing fails.

Another NULL pointer access: nothing to validate if it already failed.

===================================================================

M	source/blender/python/intern/bpy_driver.c

===================================================================

diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c
index f1f034c8465..f098a28d679 100644
--- a/source/blender/python/intern/bpy_driver.c
+++ b/source/blender/python/intern/bpy_driver.c
@@ -549,7 +549,7 @@ float BPY_driver_exec(struct PathResolvedRNA *anim_rna, ChannelDriver *driver, C
 	}
 
 #ifdef USE_BYTECODE_WHITELIST
-	if (is_recompile) {
+	if (is_recompile && expr_code) {
 		if (!(G.f & G_SCRIPT_AUTOEXEC)) {
 			if (!bpy_driver_secure_bytecode_validate(
 			            expr_code, (PyObject *[]){



More information about the Bf-blender-cvs mailing list