]> www.fi.muni.cz Git - evince.git/commitdiff
Fix memory management
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sun, 25 Dec 2005 21:10:21 +0000 (21:10 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sun, 25 Dec 2005 21:10:21 +0000 (21:10 +0000)
shell/ev-window.c

index fde1dae9c440d65607cbf500cc27711df794827d..74915613e46eb8eb341976b49ba21546b595bde2 100644 (file)
@@ -2626,7 +2626,10 @@ view_menu_popup_cb (EvView         *view,
        
        if (ev_window->priv->link)
                g_object_unref (ev_window->priv->link);
-       ev_window->priv->link = link;
+       if (link)
+               ev_window->priv->link = g_object_ref (link);
+       else    
+               ev_window->priv->link = NULL;
 
        if (ev_window->priv->link &&
                 (ev_link_get_link_type (ev_window->priv->link) == EV_LINK_TYPE_EXTERNAL_URI)) {