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-06-29 09:44:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-06-29 09:49:23 +0300
commit827ccc343ffca44fb66a7b2f53f15b20598f63e5 (patch)
tree46f3b26c90220191af52bb261fea1b6c163a1b7c
parente6f7f36e408ad313f1a89e78d0fc62c3e5bc8d07 (diff)
Partial fix T45156: scaling region crash
'ar->winy' may not be initialized, making regions zoom in (past limits) and attempt to draw very large text (~10x10k size characters), often crashing. Fix isn't complete since it only corrects factory startup.
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 045f422e4ac..0e8e6e9d144 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -127,8 +127,9 @@ void BLO_update_defaults_startup_blend(Main *bmain)
/* simple fix for 3d view properties scrollbar being not set to top */
if (ar->regiontype == RGN_TYPE_UI) {
- ar->v2d.cur.ymax = ar->v2d.tot.ymax;
- ar->v2d.cur.ymin = ar->v2d.cur.ymax - ar->winy;
+ float offset = ar->v2d.tot.ymax - ar->v2d.cur.ymax;
+ ar->v2d.cur.ymax += offset;
+ ar->v2d.cur.ymin += offset;
}
}
}