diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2007-06-12 16:48:08 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@src.gnome.org> | 2007-06-12 16:48:08 (GMT) |
commit | 6af898f7cec050d05fb795310ea184b40db71645 (patch) | |
tree | c993674b3924442f5c4d18aca93cfc787b8b766a /shell | |
parent | 09854a9ec3e45f868fee64f2ab991bf82fd731b3 (diff) |
Fix memory leak.
2007-06-12 Carlos Garcia Campos <carlosgc@gnome.org>
* shell/ev-window-title.c: (ev_window_title_update):
Fix memory leak.
svn path=/trunk/; revision=2496
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ev-window-title.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/shell/ev-window-title.c b/shell/ev-window-title.c index 5702fb3..3a7d908 100644 --- a/shell/ev-window-title.c +++ b/shell/ev-window-title.c @@ -120,12 +120,10 @@ ev_window_title_update (EvWindowTitle *window_title) if (title && window_title->uri) { ev_window_title_sanitize_extension (window_title, &title); - } else { - if (window_title->uri) { - title = get_filename_from_uri (window_title->uri); - } else { - title = g_strdup (_("Document Viewer")); - } + } else if (window_title->uri) { + title = get_filename_from_uri (window_title->uri); + } else if (!title) { + title = g_strdup (_("Document Viewer")); } for (p = title; *p; ++p) { |