[seed] seed_script_destroy: only unref source_url if it exists
- From: Alan Knowles <alank src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seed] seed_script_destroy: only unref source_url if it exists
- Date: Thu, 13 Jun 2013 08:46:13 +0000 (UTC)
commit 96e375f91cdeb48dc4d5da7f24d4ce0f8a1b54e9
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date: Wed Jun 12 11:10:12 2013 +0200
seed_script_destroy: only unref source_url if it exists
Fixes a crash when creating a script with a NULL source_url,
which is documented to be fine.
https://bugzilla.gnome.org/show_bug.cgi?id=702082
libseed/seed-api.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libseed/seed-api.c b/libseed/seed-api.c
index ced6704..79d61cb 100644
--- a/libseed/seed-api.c
+++ b/libseed/seed-api.c
@@ -415,7 +415,8 @@ void
seed_script_destroy (SeedScript * s)
{
seed_string_unref (s->script);
- seed_string_unref (s->source_url);
+ if (s->source_url)
+ seed_string_unref (s->source_url);
g_free (s);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]