Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-09-26 22:03:01 (GMT)
committer Christian Persch <chpe@src.gnome.org>2005-09-26 22:03:01 (GMT)
commit8e6d88c8b0d2871ec61a42f38352425122281be6 (patch)
tree1b82e1c3ff8066254e427e0ea32a40ef984b396e /shell
parentc51cd462314ed115f17ad1e20d3db2a362a308f7 (diff)
Guard against using g_strstrip on NULL. Fixes bug #317291.
2005-09-27 Christian Persch <chpe@cvs.gnome.org> * shell/ev-window-title.c: (ev_window_title_update): Guard against using g_strstrip on NULL. Fixes bug #317291.
Diffstat (limited to 'shell')
-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);
+ }
}
}