Commit: 86cfbeec6a7f683f988239ca08df5622abada4ea
Author: Campbell Barton
Date:   Mon Feb 23 20:02:54 2015 +1100
Branches: master
https://developer.blender.org/rB86cfbeec6a7f683f988239ca08df5622abada4ea

Partial fix for T43740

ED_area_data_swap would put the screen in an invalid state and crash.
(SpaceLink.spacetype didn't match ScrArea.type)

However behavior is still odd in the instance of the report.

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

M       source/blender/editors/screen/area.c

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

diff --git a/source/blender/editors/screen/area.c 
b/source/blender/editors/screen/area.c
index 4225b4b..c0878fe 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1522,10 +1522,10 @@ void ED_area_data_copy(ScrArea *sa_dst, ScrArea 
*sa_src, const bool do_free)
 
 void ED_area_data_swap(ScrArea *sa_dst, ScrArea *sa_src)
 {
-       sa_dst->headertype = sa_src->headertype;
-       sa_dst->spacetype = sa_src->spacetype;
-       sa_dst->type = sa_src->type;
-       sa_dst->butspacetype = sa_src->butspacetype;
+       SWAP(short, sa_dst->headertype, sa_src->headertype);
+       SWAP(char, sa_dst->spacetype, sa_src->spacetype);
+       SWAP(SpaceType *, sa_dst->type, sa_src->type);
+       SWAP(char, sa_dst->butspacetype, sa_src->butspacetype);
 
 
        SWAP(ListBase, sa_dst->spacedata, sa_src->spacedata);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to