diff src/img-view.c @ 780:44128da39e13

Drop initialization to NULL since filelist_read() will take care of it.
author zas_
date Tue, 03 Jun 2008 11:24:16 +0000
parents 477f48ba28d8
children 2d2cca2bceb0
line wrap: on
line diff
--- a/src/img-view.c	Tue Jun 03 09:41:00 2008 +0000
+++ b/src/img-view.c	Tue Jun 03 11:24:16 2008 +0000
@@ -937,6 +937,8 @@
 
 void view_window_new(FileData *fd)
 {
+	GList *list;
+
 	if (file_extension_match(fd->path, ".gqv"))
 		{
 		ViewWindow *vw;
@@ -961,15 +963,10 @@
 					 G_CALLBACK(view_window_collection_unref_cb), cd);
 			}
 		}
-	else if (isdir(fd->path))
-		{
-		GList *list = NULL;
-
-		if (filelist_read(fd->path, &list, NULL))
-			{
-			list = filelist_sort_path(list);
-			list = filelist_filter(list, FALSE);
-			}
+	else if (isdir(fd->path) && filelist_read(fd->path, &list, NULL))
+		{	
+		list = filelist_sort_path(list);
+		list = filelist_filter(list, FALSE);
 		real_view_window_new(NULL, list, NULL, NULL);
 		filelist_free(list);
 		}