[gthumb: 11/23] set the 'error' variable if the extension description could not be found



commit a60d75721db2921e0db99c43ae4dff97d0191af7
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Feb 22 18:57:55 2012 +0100

    set the 'error' variable if the extension description could not be found

 gthumb/gth-extensions.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gthumb/gth-extensions.c b/gthumb/gth-extensions.c
index 2a1d88f..9f378a3 100644
--- a/gthumb/gth-extensions.c
+++ b/gthumb/gth-extensions.c
@@ -639,7 +639,10 @@ gth_extension_manager_open (GthExtensionManager  *manager,
 	GthExtensionDescription *description;
 
 	description = g_hash_table_lookup (manager->priv->extensions, extension_name);
-	g_return_val_if_fail (description != NULL, FALSE);
+	if (description == NULL) {
+		*error = g_error_new_literal (GTH_ERROR, GTH_ERROR_EXTENSION_DEPENDENCY, "Extension not found");
+		return FALSE;
+	}
 
 	if (description->priv->opened)
 		return TRUE;



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