From b047b7838d86bc8ba78a13ca9a08211daaed10ef Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 5 Jun 2020 23:15:20 -0400 Subject: [PATCH] multiselection: Don't emit nonsensical signals I forgot to add a check here. We only want to emit a ::selection-changed if we actually changed it. --- gtk/gtkmultiselection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/gtkmultiselection.c b/gtk/gtkmultiselection.c index 31572072a7..9f2daae44a 100644 --- a/gtk/gtkmultiselection.c +++ b/gtk/gtkmultiselection.c @@ -212,7 +212,8 @@ gtk_multi_selection_add_or_remove (GtkSelectionModel *model, } while (n > 0); - gtk_selection_model_selection_changed (model, min, max - min + 1); + if (min <= max) + gtk_selection_model_selection_changed (model, min, max - min + 1); return TRUE; }