add safety check for null string in edit_text_property()

This commit is contained in:
stefan schippers 2023-10-09 13:53:57 +02:00
parent b56ee2c998
commit 6305b52d91
1 changed files with 2 additions and 2 deletions

View File

@ -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]);