[Bf-blender-cvs] [3cd147b49ff] master: Fix T74809: Use after free when merging specific areas

Julian Eisel noreply at git.blender.org
Sun Apr 19 14:40:56 CEST 2020


Commit: 3cd147b49ff5052fc4a6d0a512b774776711f685
Author: Julian Eisel
Date:   Sun Apr 19 14:36:22 2020 +0200
Branches: master
https://developer.blender.org/rB3cd147b49ff5052fc4a6d0a512b774776711f685

Fix T74809: Use after free when merging specific areas

Was incorrectly triggering animation for panels which would be free'd
before the animation ended.

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

M	source/blender/editors/interface/interface_panel.c

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

diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index b8f87a4300c..f824670cc57 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -428,7 +428,8 @@ void UI_panel_end(
     }
 
     int align = panel_aligned(area, region);
-    if (old_region_ofsx != panel_region_offset_x_get(region, align)) {
+    panel->runtime.region_ofsx = panel_region_offset_x_get(region, align);
+    if (old_region_ofsx != panel->runtime.region_ofsx) {
       panel->runtime_flag |= PNL_ANIM_ALIGN;
     }
   }



More information about the Bf-blender-cvs mailing list