diff options
author | Ton Roosendaal <ton@blender.org> | 2004-09-18 17:58:35 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-09-18 17:58:35 +0400 |
commit | e7087aa26b1d0f6abca8732166a33b6e9b8c2c30 (patch) | |
tree | 2a468b240c67f7e5095cb9f9feca48742a47f075 /source/blender/src/editfont.c | |
parent | cd79d25e839594db807e1749e9e3c65d5c8962d9 (diff) |
Found little bug in undo system for editing Font objects. Causing
crash at undo after editing.
Diffstat (limited to 'source/blender/src/editfont.c')
-rw-r--r-- | source/blender/src/editfont.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/src/editfont.c b/source/blender/src/editfont.c index 49f4169bfd0..deb1b39b8a8 100644 --- a/source/blender/src/editfont.c +++ b/source/blender/src/editfont.c @@ -207,8 +207,8 @@ static char findaccent(char char1, char code) } -static char *textbuf=0; -static char *oldstr; +static char *textbuf=NULL; +static char *oldstr=NULL; static int insert_into_textbuf(Curve *cu, char c) { @@ -555,7 +555,7 @@ void make_editText(void) Curve *cu; cu= G.obedit->data; - if(textbuf==0) textbuf= MEM_mallocN(MAXTEXT, "texteditbuf"); + if(textbuf==NULL) textbuf= MEM_mallocN(MAXTEXT, "texteditbuf"); BLI_strncpy(textbuf, cu->str, MAXTEXT); oldstr= cu->str; cu->str= textbuf; @@ -577,14 +577,14 @@ void load_editText(void) cu= G.obedit->data; MEM_freeN(oldstr); - oldstr= 0; + oldstr= NULL; cu->str= MEM_mallocN(cu->len+1, "tekstedit"); strcpy(cu->str, textbuf); /* this memory system is weak... */ MEM_freeN(textbuf); - textbuf= 0; + textbuf= NULL; cu->len= strlen(cu->str); textediting= 0; @@ -612,7 +612,7 @@ void remake_editText(void) void free_editText(void) { if(oldstr) MEM_freeN(oldstr); - textbuf= oldstr= 0; + textbuf= oldstr= NULL; textediting= 0; } |