bugfix [#23052] New Bracket Highlighting Patch Causes Seg Fault [Patch to fix attached]

by Justin Dailey (dail) for bracket highlight patch from yesterday.
This commit is contained in:
Campbell Barton
2010-07-27 19:22:23 +00:00
parent 112711e6a4
commit 51e8926cb9

View File

@@ -1157,7 +1157,7 @@ static void draw_brackets(SpaceText *st, ARegion *ar)
c++;
while(linep) {
while(c<linep->len) {
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) {