[go: up one dir, main page]

Skip to content

Commit

Permalink
add safety check for null string in edit_text_property()
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanSchippers committed Oct 9, 2023
1 parent b56ee2c commit 6305b52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/editprop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,8 +1227,8 @@ static int edit_text_property(int x)
cg = tclgetdoublevar("cadgrid");
c = xctx->rects[PINLAYER];
for(l=0;l<c; ++l) {
if(!strcmp( (get_tok_value(xctx->rect[PINLAYER][l].prop_ptr, "name",0)),
xctx->text[sel].txt_ptr) ) {
if(xctx->text[sel].txt_ptr &&
!strcmp( (get_tok_value(xctx->rect[PINLAYER][l].prop_ptr, "name",0)), xctx->text[sel].txt_ptr) ) {
/*
#if HAS_CAIRO==1
customfont = set_text_custom_font(&xctx->text[sel]);
Expand Down

0 comments on commit 6305b52

Please sign in to comment.