From 2d2a55a2a4b8845d1b0d06588d734509314d25ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 8 Oct 2008 10:07:15 +0000 Subject: [PATCH] gst/gstregistrybinary.c: If we can't get a cache file don't try to save something to it. Original commit message from CVS: * gst/gstregistrybinary.c: (gst_registry_binary_write_cache): If we can't get a cache file don't try to save something to it. Dereferencing NULL pointers usually isn't a good idea. --- ChangeLog | 6 ++++++ gst/gstregistrybinary.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 26062d4..d9282ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-08 Sebastian Dröge + + * gst/gstregistrybinary.c: (gst_registry_binary_write_cache): + If we can't get a cache file don't try to save something to it. + Dereferencing NULL pointers usually isn't a good idea. + 2008-10-07 Jan Schmidt - Sun Microsystems * tests/check/Makefile.am: diff --git a/gst/gstregistrybinary.c b/gst/gstregistrybinary.c index bb28f50..5285f4c 100644 --- a/gst/gstregistrybinary.c +++ b/gst/gstregistrybinary.c @@ -838,7 +838,8 @@ fail_free_list: } g_list_free (to_write); - (void) gst_registry_binary_cache_finish (registry, cache, FALSE); + if (cache) + (void) gst_registry_binary_cache_finish (registry, cache, FALSE); /* fall through */ } fail: -- 2.7.4