[eog: 2/3] Change g_assert to g_return_if_fail
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog: 2/3] Change g_assert to g_return_if_fail
- Date: Wed, 21 Apr 2021 17:45:46 +0000 (UTC)
commit 2c186d919b1f23dd6361d52eb5c81d75ece79853
Author: Andrew <aconz2 gmail com>
Date: Mon Apr 19 22:53:30 2021 -0500
Change g_assert to g_return_if_fail
These preconditions are already checked by the for loop, so no need to
hard crash. But this is still an invariant we want to maintain.
src/eog-thumb-view.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/eog-thumb-view.c b/src/eog-thumb-view.c
index 41bea76b..f323feca 100644
--- a/src/eog-thumb-view.c
+++ b/src/eog-thumb-view.c
@@ -247,7 +247,7 @@ eog_thumb_view_clear_range (EogThumbView *thumbview,
gint thumb = start_thumb;
gboolean result;
- g_assert (start_thumb <= end_thumb);
+ g_return_if_fail (start_thumb <= end_thumb);
path = gtk_tree_path_new_from_indices (start_thumb, -1);
for (result = gtk_tree_model_get_iter (GTK_TREE_MODEL (store), &iter, path);
@@ -269,7 +269,7 @@ eog_thumb_view_add_range (EogThumbView *thumbview,
gint thumb = start_thumb;
gboolean result;
- g_assert (start_thumb <= end_thumb);
+ g_return_if_fail (start_thumb <= end_thumb);
path = gtk_tree_path_new_from_indices (start_thumb, -1);
for (result = gtk_tree_model_get_iter (GTK_TREE_MODEL (store), &iter, path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]