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:
authorDalai Felinto <dfelinto@gmail.com>2018-05-02 19:22:09 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-05-02 19:32:44 +0300
commit965e6ed54f058c21ae6096a5449fb3d1e5235821 (patch)
tree7fc43ed56628a6db6f2b662d6252d4198fadb484
parentd8778311154bdf08f509654ae56d63734e51232f (diff)
Fix T54864: Assert when changing interface display scale
The asserts were introduced on rB5f6c45498c92 (top-bar). Although the asserts are technically correct, they would fail even in master. And the commit simply added the asserts without fixing the situation itself (as you can see in the report, it is really simple to reproduce this issue). I propose we remove the asserts and bring them back only when the situation itself is fixed. It doesn't make sense to introduce asserts that would fail with the current state of the code.
-rw-r--r--source/blender/editors/screen/area.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 5e68ad1218d..f243cf686b8 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1449,10 +1449,15 @@ static void area_calc_totrct(ScrArea *sa, int window_size_x, int window_size_y)
if (sa->totrct.ymax < (window_size_y - 1)) {
sa->totrct.ymax -= px;
}
+ /* Although the following asserts are correct they lead to a very unstable Blender.
+ * And the asserts would fail even in 2.7x (they were added in 2.8x as part of the top-bar commit).
+ * For more details see T54864. */
+#if 0
BLI_assert(sa->totrct.xmin >= 0);
BLI_assert(sa->totrct.xmax >= 0);
BLI_assert(sa->totrct.ymin >= 0);
BLI_assert(sa->totrct.ymax >= 0);
+#endif
/* for speedup */
sa->winx = BLI_rcti_size_x(&sa->totrct) + 1;