Author: stephan Date: 2007-03-01 00:08:40 +0000 (Thu, 01 Mar 2007) New Revision: 25047
Modified: squeeze/trunk/libsqueeze/archive-iter.c squeeze/trunk/src/archive_store.c Log: added some checks to archive-store history Modified: squeeze/trunk/libsqueeze/archive-iter.c =================================================================== --- squeeze/trunk/libsqueeze/archive-iter.c 2007-02-28 23:00:05 UTC (rev 25046) +++ squeeze/trunk/libsqueeze/archive-iter.c 2007-03-01 00:08:40 UTC (rev 25047) @@ -623,7 +623,7 @@ lsq_archive_iter_get_filename(const LSQArchiveIter *iter) { #ifdef debug - g_return_val_if_fail(iter, FALSE); + g_return_val_if_fail(iter, NULL); #endif return lsq_archive_entry_get_filename(iter->entry); } Modified: squeeze/trunk/src/archive_store.c =================================================================== --- squeeze/trunk/src/archive_store.c 2007-02-28 23:00:05 UTC (rev 25046) +++ squeeze/trunk/src/archive_store.c 2007-03-01 00:08:40 UTC (rev 25047) @@ -1215,7 +1215,8 @@ lsq_archive_iter_unref(list_iter->data); g_list_free(store->navigation.history); - lsq_archive_iter_unref(store->navigation.trailing); + if(store->navigation.trailing) + lsq_archive_iter_unref(store->navigation.trailing); store->navigation.history = NULL; store->navigation.present = NULL; @@ -1318,10 +1319,12 @@ basename = lsq_archive_iter_get_filename(iter); path = g_slist_prepend(path, g_strdup(basename)); iter = lsq_archive_iter_get_parent(iter); - lsq_archive_iter_unref(child); child = iter; + if(child) + lsq_archive_iter_unref(child); + else + break; } - lsq_archive_iter_unref(child); return path; } @@ -1540,18 +1543,21 @@ { if(titer == piter) { - lsq_archive_iter_unref(child); + if(child) + lsq_archive_iter_unref(child); return; } titer = lsq_archive_iter_get_parent(titer); - lsq_archive_iter_unref(child); + if(child) + lsq_archive_iter_unref(child); child = titer; } - lsq_archive_iter_unref(child); + if(child) + lsq_archive_iter_unref(child); } - - lsq_archive_iter_unref(store->navigation.trailing); + if(store->navigation.trailing) + lsq_archive_iter_unref(store->navigation.trailing); lsq_archive_iter_ref(piter); store->navigation.trailing = piter; } @@ -1576,10 +1582,12 @@ basename = lsq_archive_iter_get_filename(iter); path = g_slist_prepend(path, &basename); iter = lsq_archive_iter_get_parent(iter); - lsq_archive_iter_unref(child); child = iter; + if(child) + lsq_archive_iter_unref(child); + else + break; } - lsq_archive_iter_unref(child); return path; } _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits