[nautilus/wip/antoniof/new-list-view: 83/85] 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: 83/85] files-view: Don't abort on subdirectory methods
- Date: Sat, 9 Apr 2022 16:15:51 +0000 (UTC)
commit baa96d1d49f12acb956014f8d5fb3dab86a0c75c
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 2501b41dc..8e70b94a8 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -4743,7 +4743,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);
@@ -4778,7 +4778,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]