X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fev-window-title.c;h=2964f1414d571d2ebc2c57307254e17d4c92fbca;hb=8e6d88c8b0d2871ec61a42f38352425122281be6;hp=a7229e9d259f9dda40398733bd208a7a7aa6038f;hpb=c51cd462314ed115f17ad1e20d3db2a362a308f7;p=evince.git diff --git a/shell/ev-window-title.c b/shell/ev-window-title.c index a7229e9d..2964f141 100644 --- a/shell/ev-window-title.c +++ b/shell/ev-window-title.c @@ -105,12 +105,14 @@ ev_window_title_update (EvWindowTitle *window_title) g_return_if_fail (page_cache != NULL); doc_title = (char *)ev_page_cache_get_title (page_cache); - doc_title = g_strstrip (doc_title); - /* Make sure we get a valid title back */ - if (doc_title && doc_title[0] != '\000' && - g_utf8_validate (doc_title, -1, NULL)) { - title = g_strdup (doc_title); + if (doc_title != NULL) { + doc_title = g_strstrip (doc_title); + + if (doc_title[0] != '\0' && + g_utf8_validate (doc_title, -1, NULL)) { + title = g_strdup (doc_title); + } } }