projects
/
platform
/
upstream
/
libexif.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ad2d80
)
Don't crash if exif_content_ref/unref is passed NULL.
author
Dan Fandrich
<dan@coneharvesters.com>
Sat, 27 Apr 2019 17:30:01 +0000
(19:30 +0200)
committer
Dan Fandrich
<dan@coneharvesters.com>
Sat, 27 Apr 2019 17:30:45 +0000
(19:30 +0200)
The rest of the API functions already handle NULL values.
libexif/exif-content.c
patch
|
blob
|
history
diff --git
a/libexif/exif-content.c
b/libexif/exif-content.c
index
6d6c589
..
5f39c1b
100644
(file)
--- a/
libexif/exif-content.c
+++ b/
libexif/exif-content.c
@@
-78,12
+78,18
@@
exif_content_new_mem (ExifMem *mem)
void
exif_content_ref (ExifContent *content)
{
+ if (!content)
+ return;
+
content->priv->ref_count++;
}
void
exif_content_unref (ExifContent *content)
{
+ if (!content)
+ return;
+
content->priv->ref_count--;
if (!content->priv->ref_count)
exif_content_free (content);