Blob Blame Raw
From 942adfc25e7a00ac3cf032ced2d8949e99099f70 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Fri, 25 Sep 2015 00:30:58 +0200
Subject: [PATCH] Fix crash on AnnotInk::draw for malformed documents

---
 poppler/Annot.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 85a8ac4a..29f3621f 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -15,7 +15,7 @@
 //
 // Copyright (C) 2006 Scott Turner <scotty1024@mac.com>
 // Copyright (C) 2007, 2008 Julien Rebetez <julienr@svn.gnome.org>
-// Copyright (C) 2007-2013 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2007-2013, 2015 Albert Astals Cid <aacid@kde.org>
 // Copyright (C) 2007-2013 Carlos Garcia Campos <carlosgc@gnome.org>
 // Copyright (C) 2007, 2008 Iñigo Martínez <inigomartinez@gmail.com>
 // Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net>
@@ -6151,7 +6151,7 @@ void AnnotInk::draw(Gfx *gfx, GBool printing) {
 
     for (int i = 0; i < inkListLength; ++i) {
       const AnnotPath * path = inkList[i];
-      if (path->getCoordsLength() != 0) {
+      if (path && path->getCoordsLength() != 0) {
         appearBuf->appendf ("{0:.2f} {1:.2f} m\n", path->getX(0) - rect->x1, path->getY(0) - rect->y1);
         appearBBox->extendTo (path->getX(0) - rect->x1, path->getY(0) - rect->y1);
 
-- 
2.17.0