Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-02-23 12:02:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-02-23 12:02:54 +0300
commit86cfbeec6a7f683f988239ca08df5622abada4ea (patch)
treea2798a6faedad220c0066f63d73c7b0b0963558a
parent96c452bdf6ce703c6e6e42b4eae94ca0315b25e8 (diff)
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.
-rw-r--r--source/blender/editors/screen/area.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 4225b4bbd6e..c0878fea8ac 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);