summaryrefslogtreecommitdiff
path: root/delta.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-16 03:47:35 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-16 03:47:35 -0300
commit3a35f28fcadfff1780b7fb1715ef9a6d23338716 (patch)
treef665d93600eb8f8b6e1f02fd35b9592121a82255 /delta.c
parent53630af50305581b2b20fa7eab7cb9ac56ff37e1 (diff)
downloadeeshow-3a35f28fcadfff1780b7fb1715ef9a6d23338716.tar.gz
eeshow-3a35f28fcadfff1780b7fb1715ef9a6d23338716.tar.bz2
eeshow-3a35f28fcadfff1780b7fb1715ef9a6d23338716.zip
eeshow/delta.c (sheet_eq): check if one sheet title is NULL
May have caused a segfault.
Diffstat (limited to 'delta.c')
-rw-r--r--delta.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/delta.c b/delta.c
index 3ae1087..9343740 100644
--- a/delta.c
+++ b/delta.c
@@ -303,8 +303,12 @@ bool sheet_eq(const struct sheet *a, const struct sheet *b)
if (!(a && b))
return 0;
- if (a->title != b->title && strcmp(a->title, b->title))
- return 0;
+ if (a->title != b->title) {
+ if (!a->title || !b->title)
+ return 0;
+ if (strcmp(a->title, b->title))
+ return 0;
+ }
obj_a = a->objs;
obj_b = b->objs;