[gnome-builder] sourceview: cleanup assertions
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] sourceview: cleanup assertions
- Date: Wed, 17 May 2017 00:45:43 +0000 (UTC)
commit 5bb2582e91a144d4419a78ef0ee93e80aee6eb62
Author: Christian Hergert <chergert redhat com>
Date: Tue May 16 17:41:46 2017 -0700
sourceview: cleanup assertions
libide/sourceview/ide-source-view.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/libide/sourceview/ide-source-view.c b/libide/sourceview/ide-source-view.c
index 878c44d..2a92296 100644
--- a/libide/sourceview/ide-source-view.c
+++ b/libide/sourceview/ide-source-view.c
@@ -536,9 +536,11 @@ get_rect_for_iters (GtkTextView *text_view,
GtkTextIter iter;
g_assert (GTK_IS_TEXT_VIEW (text_view));
- g_assert (iter1);
- g_assert (iter2);
- g_assert (rect);
+ g_assert (iter1 != NULL);
+ g_assert (iter2 != NULL);
+ g_assert (rect != NULL);
+ g_assert (gtk_text_iter_get_buffer (iter1) == gtk_text_iter_get_buffer (iter2));
+ g_assert (gtk_text_view_get_buffer (text_view) == gtk_text_iter_get_buffer (iter1));
begin = *iter1;
end = *iter2;
@@ -597,8 +599,8 @@ animate_expand (IdeSourceView *self,
GdkRectangle rect = { 0 };
g_assert (IDE_IS_SOURCE_VIEW (self));
- g_assert (begin);
- g_assert (end);
+ g_assert (begin != NULL);
+ g_assert (end != NULL);
get_rect_for_iters (GTK_TEXT_VIEW (self), begin, end, &rect, GTK_TEXT_WINDOW_WIDGET);
gtk_widget_get_allocation (GTK_WIDGET (self), &alloc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]