From a7c72e68039026a0a3adae390e9089f9b20a80ef Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Fri, 25 Nov 2011 07:44:09 +0000 Subject: [PATCH] Fix off-by-one error --- src/objects/grits-object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objects/grits-object.c b/src/objects/grits-object.c index a3b60ec..30f79f9 100644 --- a/src/objects/grits-object.c +++ b/src/objects/grits-object.c @@ -63,10 +63,10 @@ void grits_object_pickdraw(GritsObject *object, GritsOpenGL *opengl, gboolean pi /* Skip object with no signals when picking */ for (int i = 0; pick; i++) { - if (g_signal_has_handler_pending(object, signals[i], 0, FALSE)) - break; if (i == NUM_SIGNALS) return; + if (g_signal_has_handler_pending(object, signals[i], 0, FALSE)) + break; } /* Support GritsTester */ -- 2.43.2