[gthumb] fixed error when loading the active filter file
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] fixed error when loading the active filter file
- Date: Thu, 2 Aug 2012 12:34:29 +0000 (UTC)
commit b9ea2a7f7a5d1b47b80300fff82c215aa9244f0d
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun May 13 19:39:49 2012 +0200
fixed error when loading the active filter file
check whether the buffer is null before using it
gthumb/gth-filterbar.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gthumb/gth-filterbar.c b/gthumb/gth-filterbar.c
index a0eabab..fcaacb3 100644
--- a/gthumb/gth-filterbar.c
+++ b/gthumb/gth-filterbar.c
@@ -533,6 +533,11 @@ gth_filterbar_load_filter (GthFilterbar *filterbar,
return;
}
+ if (buffer == NULL) {
+ g_object_unref (filter_file);
+ return;
+ }
+
doc = dom_document_new ();
if (dom_document_load (doc, buffer, len, NULL)) {
DomElement *node = DOM_ELEMENT (doc)->first_child;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]