summaryrefslogtreecommitdiff
path: root/libspectre/ps.c
diff options
context:
space:
mode:
Diffstat (limited to 'libspectre/ps.c')
-rw-r--r--libspectre/ps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libspectre/ps.c b/libspectre/ps.c
index 678aa7f..f0432aa 100644
--- a/libspectre/ps.c
+++ b/libspectre/ps.c
@@ -1073,7 +1073,7 @@ continuepage:
* name. Case insensitive compares are only used for
* PaperSize comments.
*/
- if (_spectre_strcasecmp(cp, dmp->name) == 0) {
+ if (cp && _spectre_strcasecmp(cp, dmp->name) == 0) {
doc->pages[doc->numpages].media = dmp;
break;
}