From: Nickolay V. Shmyrev Date: Sun, 25 Dec 2005 21:10:21 +0000 (+0000) Subject: Fix memory management X-Git-Tag: EVINCE_0_5_0~46 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=a71c2d133840d261ee229f6a2abe90aed9d0dee4;p=evince.git Fix memory management --- diff --git a/shell/ev-window.c b/shell/ev-window.c index fde1dae9..74915613 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -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)) {