summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2005-04-19 19:48:49 +0000
committerKristian Høgsberg <krh@redhat.com>2005-04-19 19:48:49 +0000
commit6ef9d30f06be2bd8a9e1470d70f49843a7e432ac (patch)
tree3f1182de740b6b8cc79b243508e06c9a58668ae1 /glib
parent770b7310ce8b07f95960c2014bf3f6040c060ac4 (diff)
Tue Apr 19 15:43:35 2005 Kristian Høgsberg <krh@redhat.com>
* glib/poppler-action.cc (_poppler_action_new): Handle NULL links gracefully (fix from Jeff).
Diffstat (limited to 'glib')
-rw-r--r--glib/poppler-action.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/glib/poppler-action.cc b/glib/poppler-action.cc
index d2fdd8ed..0f1f38c5 100644
--- a/glib/poppler-action.cc
+++ b/glib/poppler-action.cc
@@ -1,4 +1,4 @@
-/* poppler-action.cc: glib wrapper for poppler
+/* poppler-action.cc: glib wrapper for poppler -*- c-basic-offset: 8 -*-
* Copyright (C) 2005, Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify
@@ -248,6 +248,11 @@ _poppler_action_new (PopplerDocument *document,
action = g_new0 (PopplerAction, 1);
+ if (link == NULL) {
+ action->type = POPPLER_ACTION_UNKNOWN;
+ return action;
+ }
+
switch (link->getKind ()) {
case actionGoTo:
action->type = POPPLER_ACTION_GOTO_DEST;