diff options
author | Christian Hergert <chergert@redhat.com> | 2022-11-18 12:37:40 -0800 |
---|---|---|
committer | Christian Hergert <christian@hergert.me> | 2022-11-18 20:52:15 +0000 |
commit | 4709b2a59b3933bf6a8019c3f8b12ec665781000 (patch) | |
tree | c1532365b2a15be9d79ce67c0fc46f81457da16f | |
parent | 834373dbeb604c630644ba9a44a2948020b32542 (diff) | |
download | gtksourceview-4709b2a59b3933bf6a8019c3f8b12ec665781000.tar.gz |
Revert "listsnapshot: allow mismatched hold()/release()"
This reverts commit dc000fbd1b737f4a26139e6df6622d68a4c867e0.
-rw-r--r-- | gtksourceview/gtksourcelistsnapshot.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/gtksourceview/gtksourcelistsnapshot.c b/gtksourceview/gtksourcelistsnapshot.c index 0c9a0dac..733d720a 100644 --- a/gtksourceview/gtksourcelistsnapshot.c +++ b/gtksourceview/gtksourcelistsnapshot.c @@ -383,17 +383,9 @@ gtk_source_list_snapshot_release (GtkSourceListSnapshot *self) guint new_n_items; g_return_if_fail (GTK_SOURCE_IS_LIST_SNAPSHOT (self)); + g_return_if_fail (self->held_position != GTK_INVALID_LIST_POSITION); g_return_if_fail (self->held_items != NULL); - /* Allow mismatched calls to release() which can happen often when - * paired with GdkFrameClock update/after-paint, especially when - * multiple surfaces are used. - */ - if (self->held_position == GTK_INVALID_LIST_POSITION) - { - return; - } - was_invalid = self->invalid; old_n_items = self->held_n_items; new_n_items = self->model ? g_list_model_get_n_items (self->model) : 0; |