diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-05-29 03:48:29 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-05-29 03:48:29 +0400 |
commit | a741cbff82b824877f3799d45b07c68b0485249e (patch) | |
tree | 53e5957011d4b7d8f88765bd2ce3cc6871f3a788 /source/blender/editors/space_text | |
parent | 276a75ae071ac44e813a0b5e499846e752d80b1e (diff) |
2.5: fix text editor issue with scrolling and an invalid memory read.
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 456060d77a7..0dfe7c9e660 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -119,8 +119,8 @@ static void flatten_string_append(FlattenString *fs, char c, int accum) if(olen) fs->len*= 2; else fs->len= 256; - nbuf= MEM_mallocN(sizeof(*fs->buf)*fs->len, "fs->buf"); - naccum= MEM_mallocN(sizeof(*fs->accum)*fs->len, "fs->accum"); + nbuf= MEM_callocN(sizeof(*fs->buf)*fs->len, "fs->buf"); + naccum= MEM_callocN(sizeof(*fs->accum)*fs->len, "fs->accum"); if(olen) { memcpy(nbuf, fs->buf, olen); diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 5f974e7bcbb..065b4ffcc48 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -1709,7 +1709,7 @@ static int scroll_exec(bContext *C, wmOperator *op) screen_skip(st, lines*U.wheellinescroll); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, st->text); + ED_area_tag_redraw(CTX_wm_area(C)); return OPERATOR_FINISHED; } |