[poppler] poppler/glib: poppler-action.cc,1.1,1.2

Kristian Hogsberg krh at freedesktop.org
Tue Apr 19 12:48:51 PDT 2005


Update of /cvs/poppler/poppler/glib
In directory gabe:/tmp/cvs-serv16895/glib

Modified Files:
	poppler-action.cc 
Log Message:
Tue Apr 19 15:43:35 2005  Kristian Høgsberg  <krh at redhat.com>

        * glib/poppler-action.cc (_poppler_action_new): Handle NULL links
        gracefully (fix from Jeff).



Index: poppler-action.cc
===================================================================
RCS file: /cvs/poppler/poppler/glib/poppler-action.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- poppler-action.cc	30 Mar 2005 04:08:26 -0000	1.1
+++ poppler-action.cc	19 Apr 2005 19:48:49 -0000	1.2
@@ -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 @@
 
 	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;



More information about the poppler mailing list