[gcab] trivial: Fix critical warning when unref'ing a GCabFile
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcab] trivial: Fix critical warning when unref'ing a GCabFile
- Date: Tue, 12 Dec 2017 23:23:30 +0000 (UTC)
commit 806e1c4b92d1830028e6675a86ee345aecfd6851
Author: Richard Hughes <richard hughsie com>
Date: Tue Dec 12 22:36:48 2017 +0000
trivial: Fix critical warning when unref'ing a GCabFile
If we created this with gcab_folder_new_with_cfolder() the GFile is not set.
libgcab/gcab-file.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libgcab/gcab-file.c b/libgcab/gcab-file.c
index d9a25b6..39284e4 100644
--- a/libgcab/gcab-file.c
+++ b/libgcab/gcab-file.c
@@ -62,7 +62,8 @@ gcab_file_finalize (GObject *object)
{
GCabFile *self = GCAB_FILE (object);
- g_object_unref (self->file);
+ if (self->file != NULL)
+ g_object_unref (self->file);
g_free (self->name);
g_free (self->extract_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]