diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-05-21 05:05:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-05-21 05:22:32 +0300 |
commit | 522e6c0c06197a2fe46810c4f77ddba881f12cbf (patch) | |
tree | a0cfa18815710f95642e395cfd5294bda1943178 /source | |
parent | af3a55bb1b7d11c3036839d66fcf4280f1dae96b (diff) |
Cleanup: add asserts for textview drawing
This would have prevented T74298.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_info/textview.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c index 3c0ef4a6386..5d5c41597b4 100644 --- a/source/blender/editors/space_info/textview.c +++ b/source/blender/editors/space_info/textview.c @@ -429,6 +429,11 @@ int textview_draw(TextViewContext *tvc, tvc->end(tvc); + /* Sanity checks (bugs here can be tricky to track down). */ + BLI_assert(tds.lheight == tvc->lheight); + BLI_assert(tds.row_vpadding == tvc->row_vpadding); + BLI_assert(tds.do_draw == do_draw); + xy[1] += tvc->lheight * 2; return xy[1] - y_orig; |