[gobject-introspection] scannerlexer: Fix bad unref
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] scannerlexer: Fix bad unref
- Date: Tue, 17 Dec 2013 05:35:23 +0000 (UTC)
commit 8c6978ed79fc0dfc2cef0b9dd61a7bdfcd12cfdf
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Dec 17 00:10:10 2013 -0500
scannerlexer: Fix bad unref
It's possible for scanner->current_file to be NULL, so add a check...
giscanner/scannerlexer.l | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index 413bd98..b594362 100644
--- a/giscanner/scannerlexer.l
+++ b/giscanner/scannerlexer.l
@@ -400,7 +400,8 @@ process_linemarks (GISourceScanner *scanner)
filename = real;
}
- g_object_unref (scanner->current_file);
+ if (scanner->current_file)
+ g_object_unref (scanner->current_file);
scanner->current_file = g_file_new_for_path (filename);
g_free (filename);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]