]> www.fi.muni.cz Git - evince.git/commitdiff
Check the links info is initialized before using it. Should fix a crash on
authorMarco Pesenti Gritti <marco@gnome.org>
Fri, 21 Jan 2005 09:24:03 +0000 (09:24 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Fri, 21 Jan 2005 09:24:03 +0000 (09:24 +0000)
2005-01-21  Marco Pesenti Gritti  <marco@gnome.org>

        * pdf/xpdf/pdf-document.cc:

        Check the links info is initialized before
        using it. Should fix a crash on startup.

ChangeLog
pdf/xpdf/pdf-document.cc

index 3c6dd89553ff579925ab332250f6e9de2ae030a0..ca4c08d2e35ae2e3135d570bc0bbd3318eac0fe5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-01-21  Marco Pesenti Gritti  <marco@gnome.org>
+
+       * pdf/xpdf/pdf-document.cc:
+
+       Check the links info is initialized before
+       using it. Should fix a crash on startup.
+
 2005-01-21  Martin Kretzschmar  <martink@gnome.org>
 
        * pixbuf/pixbuf-document.c
index b9180bd9988b1e712c4c79a445401f5777e33e3e..96b11325a9dfee1906a3f98f0ff1b8b201aab9eb 100644 (file)
@@ -1041,6 +1041,10 @@ pdf_document_get_link (EvDocument *document, int x, int y)
        LinkAction *action;
        double link_x, link_y;
 
+       if (pdf_document->links == NULL) {
+               return NULL;
+       }
+
        /* Zoom */
        link_x = x / pdf_document->scale;
        link_y = y / pdf_document->scale;