New font drawing crashed on untitled windows

This commit is contained in:
Bill Spitzak
2015-10-03 11:03:22 -07:00
parent 571a268f21
commit d14aad2e54

View File

@ -473,7 +473,7 @@ Frame::~Frame() {
delete[] window_Colormaps;
}
//if (iconlabel()) XFree((char*)iconlabel());
if (label()) XFree((char*)label());
if (label()) XFree((char*)label());
}
////////////////////////////////////////////////////////////////
@ -1284,9 +1284,10 @@ void Frame::draw() {
#endif
fl_color(labelcolor());
fl_font(TITLE_FONT_SLOT, TITLE_FONT_SIZE);
fl_draw(90, label(),
(left + fl_height() + 1)/2 - fl_descent(),
label_y+3+fl_width(label()));
if (label() && *label())
fl_draw(90, label(),
(left + fl_height() + 1)/2 - fl_descent(),
label_y+3+fl_width(label()));
fl_pop_clip();
}
}