diff options
author | Ton Roosendaal <ton@blender.org> | 2008-10-04 17:42:45 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-10-04 17:42:45 +0400 |
commit | 324e1d57ac561360caa3e660804d642aeeeb47c0 (patch) | |
tree | 49aa139321a615f2b43cb56ef05a26d134516280 /source/blender/src/drawtext.c | |
parent | f8d7da21b19985c6e7f97bdb1246386fbcdd1f77 (diff) |
Bugfix #17750
Texteditor misses NULL checks in 'wrap text' code, moving cursur while
text is selected.
Diffstat (limited to 'source/blender/src/drawtext.c')
-rw-r--r-- | source/blender/src/drawtext.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c index dbb3aaf7672..0a6647be913 100644 --- a/source/blender/src/drawtext.c +++ b/source/blender/src/drawtext.c @@ -2134,7 +2134,7 @@ static void wrap_move_up(SpaceText *st, short sel) { if (toline<fromline) text->sell= text->sell->prev; if (c>text->sell->len) c= text->sell->len; text->selc= c; - } else { + } else if(text->curl) { txt_undo_add_toop(text, UNDO_CTO, fromline, text->curc, toline, c); if (toline<fromline) text->curl= text->curl->prev; if (c>text->curl->len) c= text->curl->len; @@ -2175,10 +2175,10 @@ static void wrap_move_down(SpaceText *st, short sel) { if (toline>fromline) text->sell= text->sell->next; if (c>text->sell->len) c= text->sell->len; text->selc= c; - } else { + } else if(text->curl) { txt_undo_add_toop(text, UNDO_CTO, fromline, text->curc, toline, c); if (toline>fromline) text->curl= text->curl->next; - if (c>text->curl->len) c= text->curl->len; + if (c > text->curl->len) c= text->curl->len; text->curc= c; txt_pop_sel(text); } |