diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-27 10:14:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-27 10:14:51 +0400 |
commit | b68f1a9f3d4cb7a5d8469eec7db44331ba163638 (patch) | |
tree | ed6c4e0db1327a355cb7fd3ce5f967b8c9ac4a74 /source/blender/editors/space_text/text_draw.c | |
parent | 8907a0808a9cebb932b739899895e34500257653 (diff) |
fix for floating point exception.
Diffstat (limited to 'source/blender/editors/space_text/text_draw.c')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 62274fc664a..be2d993dab5 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -498,7 +498,7 @@ int wrap_width(SpaceText *st, ARegion *ar) int x, max; x= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; - max= (winx-x)/st->cwidth; + max= st->cwidth ? (winx-x)/st->cwidth : 0; return max>8 ? max : 8; } |