]> www.fi.muni.cz Git - evince.git/commitdiff
Make sure metadata exists before reference it when opening a copy
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 11 Oct 2009 15:19:28 +0000 (17:19 +0200)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 11 Oct 2009 15:19:28 +0000 (17:19 +0200)
shell/ev-window.c

index e1a427d555f66b5d9b63e5e2bc6904de034baa6a..97c9aa17559c804be8485494ed406c68fee59749 100644 (file)
@@ -2128,7 +2128,8 @@ ev_window_open_copy_at_dest (EvWindow   *window,
 {
        EvWindow *new_window = EV_WINDOW (ev_window_new ());
 
-       new_window->priv->metadata = g_object_ref (window->priv->metadata);
+       if (window->priv->metadata)
+               new_window->priv->metadata = g_object_ref (window->priv->metadata);
        ev_window_open_document (new_window,
                                 window->priv->document,
                                 dest, 0, NULL);