[nautilus/wip/antoniof/new-list-view: 10/12] files-view: Don't abort on subdirectory methods
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/new-list-view: 10/12] files-view: Don't abort on subdirectory methods
- Date: Sun, 22 May 2022 17:56:57 +0000 (UTC)
commit 9333d6159ea29924f37bbc654ef8a5a64b2c05dd
Author: António Fernandes <antoniof gnome org>
Date: Wed Apr 6 00:40:26 2022 +0100
files-view: Don't abort on subdirectory methods
There is no unrecoverable error as far as I can see. Instead return
early if the this programming error happens.
src/nautilus-files-view.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 4577b494a..a0dcb41ed 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -4741,7 +4741,7 @@ nautilus_files_view_add_subdirectory (NautilusFilesView *view,
priv = nautilus_files_view_get_instance_private (view);
- g_assert (!g_list_find (priv->subdirectory_list, directory));
+ g_return_if_fail (!g_list_find (priv->subdirectory_list, directory));
nautilus_directory_ref (directory);
@@ -4776,7 +4776,7 @@ nautilus_files_view_remove_subdirectory (NautilusFilesView *view,
NautilusFilesViewPrivate *priv;
priv = nautilus_files_view_get_instance_private (view);
- g_assert (g_list_find (priv->subdirectory_list, directory));
+ g_return_if_fail (g_list_find (priv->subdirectory_list, directory));
priv->subdirectory_list = g_list_remove (
priv->subdirectory_list, directory);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]