[gthumb] fixed crash when the id is null



commit a1cac5748ffccb58a3411a85db1f89e26c99296c
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sat Jul 24 09:27:09 2010 +0200

    fixed crash when the id is null

 gthumb/gth-main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gthumb/gth-main.c b/gthumb/gth-main.c
index 238222a..0fc6e3a 100644
--- a/gthumb/gth-main.c
+++ b/gthumb/gth-main.c
@@ -564,6 +564,9 @@ gth_main_get_metadata_category (const char *id)
 {
 	int i;
 
+	if (id == NULL)
+		return NULL;
+
 	for (i = 0; i < Main->priv->metadata_category->len; i++) {
 		GthMetadataCategory *category;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]