Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-window-title.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ev-window-title.c')
-rw-r--r--shell/ev-window-title.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/shell/ev-window-title.c b/shell/ev-window-title.c
index a7229e9..2964f14 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);
+ }
}
}