[Xfce4-commits] r23438 - in xarchiver/branches/xarchiver-psybsd: libxarchiver src

Stephan Arts stephan at xfce.org
Tue Oct 17 08:17:59 UTC 2006


Author: stephan
Date: 2006-10-17 08:17:58 +0000 (Tue, 17 Oct 2006)
New Revision: 23438

Modified:
   xarchiver/branches/xarchiver-psybsd/libxarchiver/archive.c
   xarchiver/branches/xarchiver-psybsd/src/archive_store.c
   xarchiver/branches/xarchiver-psybsd/src/main.c
Log:
Fixed stuff (almost)


Modified: xarchiver/branches/xarchiver-psybsd/libxarchiver/archive.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/libxarchiver/archive.c	2006-10-17 07:32:15 UTC (rev 23437)
+++ xarchiver/branches/xarchiver-psybsd/libxarchiver/archive.c	2006-10-17 08:17:58 UTC (rev 23438)
@@ -232,19 +232,24 @@
 	{
 		lxa_archive_free_entry(archive, buffer_iter->entry);
 	}
-	lxa_slist_free(entry->buffer);
-	entry->buffer = NULL;
+	if(entry->buffer)
+	{
+		lxa_slist_free(entry->buffer);
+		entry->buffer = NULL;
+	}
 
 	if(entry->children)
 	{
 		/* first elemant of the array (*entry->children) contains the size of the array */
-		for(i = 1; i <= GPOINTER_TO_INT(*entry->children); i++)
+		/* WHY DOES i end up being 2 when *entry->children == 1 ?! */
+		for(i = 1; i <= GPOINTER_TO_INT(*entry->children); ++i)
 			lxa_archive_free_entry(archive, entry->children[i]);
+
 		g_free(entry->children);
 		entry->children = NULL;
 	}
 
-	if(entry->props)
+	if(props_iter)
 	{
 		for(i=1; i<archive->n_property; i++)
 		{

Modified: xarchiver/branches/xarchiver-psybsd/src/archive_store.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/archive_store.c	2006-10-17 07:32:15 UTC (rev 23437)
+++ xarchiver/branches/xarchiver-psybsd/src/archive_store.c	2006-10-17 08:17:58 UTC (rev 23438)
@@ -812,8 +812,11 @@
 static void
 xa_archive_store_sort(XAArchiveStore *store)
 {
-	g_free(store->sort_list);
-	store->sort_list = NULL;
+	if(store->sort_list)
+	{
+		g_free(store->sort_list);
+		store->sort_list = NULL;
+	}
 
 	if(store->sort_column < 0)
 		return;
@@ -1086,7 +1089,11 @@
 	LXAEntry *entry = NULL;
 	gint prev_size =  0;
 
-	g_free(store->sort_list);
+	if(store->sort_list)
+	{
+		g_free(store->sort_list);
+		store->sort_list = NULL;
+	}
 
 	if(store->current_entry)
 	{

Modified: xarchiver/branches/xarchiver-psybsd/src/main.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/main.c	2006-10-17 07:32:15 UTC (rev 23437)
+++ xarchiver/branches/xarchiver-psybsd/src/main.c	2006-10-17 08:17:58 UTC (rev 23438)
@@ -248,7 +248,7 @@
 				if(!xa_main_window_open_archive(XA_MAIN_WINDOW(main_window), argv[i]))
 				{
 					opened_archives++;
-					gtk_widget_set_size_request(main_window, 300, 300);
+					gtk_widget_set_size_request(main_window, 500, 350);
 					gtk_widget_show_all(main_window);
 				} else
 				{



More information about the Xfce4-commits mailing list