Temporary solution to crashing bug with --sysfonts: fail gracefully
(instead of "exit(42)"), and simply return to the previous tool.
This commit is contained in:
parent
f6164dc9a4
commit
80334fae04
1 changed files with 24 additions and 6 deletions
|
|
@ -1709,6 +1709,7 @@ static void parse_font_style(style_info *si)
|
||||||
sp += strlen("Regular");
|
sp += strlen("Regular");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
if(!strncasecmp(sp,"Italic",strlen("Italic")))
|
if(!strncasecmp(sp,"Italic",strlen("Italic")))
|
||||||
{
|
{
|
||||||
sp += strlen("Italic");
|
sp += strlen("Italic");
|
||||||
|
|
@ -1721,6 +1722,7 @@ static void parse_font_style(style_info *si)
|
||||||
si->italic = 1;
|
si->italic = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// move " Condensed" from style to family
|
// move " Condensed" from style to family
|
||||||
if(!strncasecmp(sp,"Condensed",strlen("Condensed")))
|
if(!strncasecmp(sp,"Condensed",strlen("Condensed")))
|
||||||
{
|
{
|
||||||
|
|
@ -3154,11 +3156,23 @@ static void mainloop(void)
|
||||||
do_setcursor(cursor_arrow);
|
do_setcursor(cursor_arrow);
|
||||||
}
|
}
|
||||||
draw_tux_text(tool_tux[cur_tool], tool_tips[cur_tool], 1);
|
draw_tux_text(tool_tux[cur_tool], tool_tips[cur_tool], 1);
|
||||||
cur_thing = cur_font;
|
|
||||||
num_things = num_font_families;
|
if (num_font_families > 0)
|
||||||
thing_scroll = &font_scroll;
|
{
|
||||||
draw_fonts();
|
cur_thing = cur_font;
|
||||||
draw_colors(COLORSEL_ENABLE);
|
num_things = num_font_families;
|
||||||
|
thing_scroll = &font_scroll;
|
||||||
|
draw_fonts();
|
||||||
|
draw_colors(COLORSEL_ENABLE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Problem using fonts! */
|
||||||
|
|
||||||
|
cur_tool = old_tool;
|
||||||
|
draw_toolbar();
|
||||||
|
update_screen_rect(&r_tools);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (cur_tool == TOOL_MAGIC)
|
else if (cur_tool == TOOL_MAGIC)
|
||||||
{
|
{
|
||||||
|
|
@ -7457,7 +7471,11 @@ printf("read: fd=%d buf_fill=%u buf_size=%u rc=%ld\n", font_socket_fd, buf_fill,
|
||||||
if(WIFSIGNALED(status))
|
if(WIFSIGNALED(status))
|
||||||
{
|
{
|
||||||
printf("child killed by signal %u\n", WTERMSIG(status));
|
printf("child killed by signal %u\n", WTERMSIG(status));
|
||||||
exit(42);
|
user_font_families = NULL;
|
||||||
|
num_font_families = 0;
|
||||||
|
font_thread_done = 1;
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
show_progress_bar();
|
show_progress_bar();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue