Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-06-28 03:01:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-06-28 03:01:33 +0400
commitf9ae102afd4a6dd03a028127c2e2b4f99ae8cf57 (patch)
tree9822c0a276413a7bcca2615c7c451d5449a56b65 /source/blender/src
parentf0a3cbcdac4c7f84daef7c33e858a10277400a5f (diff)
bugfix, txt_to_buf would crash on an empty text file.
Also checked all other uses of text->lines.first to make sure the assumption isn't made elsewhere. Added 2 more checks for text->lines.first when converting text buffer to objects.
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/editfont.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/src/editfont.c b/source/blender/src/editfont.c
index cb245867c89..a3b05a008c8 100644
--- a/source/blender/src/editfont.c
+++ b/source/blender/src/editfont.c
@@ -354,7 +354,7 @@ void txt_export_to_object(struct Text *text)
// char sdir[FILE_MAXDIR];
// char sfile[FILE_MAXFILE];
- if(!text) return;
+ if(!text || !text->lines.first) return;
id = (ID *)text;
@@ -429,7 +429,7 @@ void txt_export_to_objects(struct Text *text)
int linenum = 0;
float offset[3] = {0.0,0.0,0.0};
- if(!text) return;
+ if(!text || !text->lines.first) return;
id = (ID *)text;