Only use font_info after we know, the request succeded

next
Axel Wagner 2011-01-01 15:19:17 +01:00
parent 64d8d40b25
commit 8f0518c5c5
1 changed files with 2 additions and 1 deletions

View File

@ -552,12 +552,13 @@ void init_xcb(char *fontname) {
font_info = xcb_query_font_reply(xcb_connection,
query_font_cookie,
NULL);
font_height = font_info->font_ascent + font_info->font_descent;
if (xcb_request_failed(open_font_cookie, "Could not open font")) {
exit(EXIT_FAILURE);
}
font_height = font_info->font_ascent + font_info->font_descent;
if (xcb_query_font_char_infos_length(font_info) == 0) {
font_table = NULL;
} else {