From: Marco Pesenti Gritti Date: Fri, 21 Jan 2005 09:24:03 +0000 (+0000) Subject: Check the links info is initialized before using it. Should fix a crash on X-Git-Tag: EVINCE_0_1_1~20 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=a0ed55c37314448eaa19c4c11198e32ddb899bbc;p=evince.git Check the links info is initialized before using it. Should fix a crash on 2005-01-21 Marco Pesenti Gritti * pdf/xpdf/pdf-document.cc: Check the links info is initialized before using it. Should fix a crash on startup. --- diff --git a/ChangeLog b/ChangeLog index 3c6dd895..ca4c08d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-01-21 Marco Pesenti Gritti + + * 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 * pixbuf/pixbuf-document.c diff --git a/pdf/xpdf/pdf-document.cc b/pdf/xpdf/pdf-document.cc index b9180bd9..96b11325 100644 --- a/pdf/xpdf/pdf-document.cc +++ b/pdf/xpdf/pdf-document.cc @@ -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;