]> www.fi.muni.cz Git - evince.git/commitdiff
Fix memory leak.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Tue, 12 Jun 2007 16:48:08 +0000 (16:48 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Tue, 12 Jun 2007 16:48:08 +0000 (16:48 +0000)
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

ChangeLog
shell/ev-window-title.c

index d378f2b8937d3fe39474012830b8f66bb56f4f3f..35fa4305f46d093767f384a57d54a4c53fa60305 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-12  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-window-title.c: (ev_window_title_update):
+
+       Fix memory leak.
+       
 2007-06-09  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * shell/ev-view.c: (draw_loading_text):
index 5702fb32a20f5684c11289d052b19425d7f33ed9..3a7d908dafeb99fec468421fc2e310eaa6cf1f4d 100644 (file)
@@ -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) {