From 51e8926cb9935da2e9cecd47acd414de241eb786 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Jul 2010 19:22:23 +0000 Subject: bugfix [#23052] New Bracket Highlighting Patch Causes Seg Fault [Patch to fix attached] by Justin Dailey (dail) for bracket highlight patch from yesterday. --- source/blender/editors/space_text/text_draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_text') diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 8570965bb03..fba2fe89997 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1157,7 +1157,7 @@ static void draw_brackets(SpaceText *st, ARegion *ar) c++; while(linep) { while(clen) { - if(linep->format[c] != 'l' && linep->format[c] != '#') { + if(linep->format && linep->format[c] != 'l' && linep->format[c] != '#') { b= text_check_bracket(linep->line[c]); if(b==find) { if(stack==0) { @@ -1183,7 +1183,7 @@ static void draw_brackets(SpaceText *st, ARegion *ar) c--; while(linep) { while(c>=0) { - if(linep->format[c] != 'l' && linep->format[c] != '#') { + if(linep->format && linep->format[c] != 'l' && linep->format[c] != '#') { b= text_check_bracket(linep->line[c]); if(b==find) { if(stack==0) { -- cgit v1.2.3