[gthumb: 9/23] abort if the extensions folder doesn't exist



commit 8bcefaccae784af3735a736cb0d95a03a4d91501
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Feb 22 18:54:52 2012 +0100

    abort if the extensions folder doesn't exist

 gthumb/gth-extensions.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gthumb/gth-extensions.c b/gthumb/gth-extensions.c
index 5305501..2a1d88f 100644
--- a/gthumb/gth-extensions.c
+++ b/gthumb/gth-extensions.c
@@ -572,6 +572,11 @@ gth_extension_manager_load_extensions (GthExtensionManager *self)
 
 	extensions_dir = g_file_new_for_path (GTHUMB_EXTENSIONS_DIR);
 	enumerator = g_file_enumerate_children (extensions_dir, G_FILE_ATTRIBUTE_STANDARD_NAME, 0, NULL, NULL);
+	if (enumerator == NULL) {
+		g_critical ("Could not find the extensions folder: %s", g_file_get_uri (extensions_dir));
+		abort ();
+	}
+
 	while ((info = g_file_enumerator_next_file (enumerator, NULL, NULL)) != NULL) {
 		const char              *name;
 		GFile                   *ext_file;



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