diff -U0 pycups-1.9.61/ChangeLog.ppd-null pycups-1.9.61/ChangeLog --- pycups-1.9.61/ChangeLog.ppd-null 2012-03-06 10:53:09.000000000 +0000 +++ pycups-1.9.61/ChangeLog 2012-04-10 12:22:16.224974764 +0100 @@ -0,0 +1,5 @@ +2012-03-22 Tim Waugh + + * cupsppd.c (PPD_dealloc): Add missing NULL check for + debugging message (Ubuntu #951001). Patch from Till Kamppeter. + diff -up pycups-1.9.61/cupsppd.c.ppd-null pycups-1.9.61/cupsppd.c --- pycups-1.9.61/cupsppd.c.ppd-null 2011-12-08 13:22:35.000000000 +0000 +++ pycups-1.9.61/cupsppd.c 2012-04-10 12:22:16.224974764 +0100 @@ -236,10 +236,12 @@ PPD_init (PPD *self, PyObject *args, PyO static void PPD_dealloc (PPD *self) { - debugprintf ("- PPD %p (fd %d)\n", self, fileno (self->file)); - - if (self->file) + if (self->file) { + debugprintf ("- PPD %p (fd %d)\n", self, fileno (self->file)); fclose (self->file); + } else + debugprintf ("- PPD %p (no fd)\n", self); + if (self->ppd) ppdClose (self->ppd); if (self->conv_from)