[gtk+/gtk-2-24] Handle NULL intp in test_increment_intp()



commit 78bb09c5a10691b477980bd51dd13e12235d33c8
Author: Martin Nordholts <martinn src gnome org>
Date:   Sun Oct 31 00:06:48 2010 +0200

    Handle NULL intp in test_increment_intp()
    
    Support passing NULL for &int to gtk_test_display_button_window() so
    we can use that function also when we are not interested in counting
    clicks.

 gtk/gtktestutils.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktestutils.c b/gtk/gtktestutils.c
index 5ea2d1d..8c0bb55 100644
--- a/gtk/gtktestutils.c
+++ b/gtk/gtktestutils.c
@@ -534,7 +534,8 @@ try_main_quit (void)
 static int
 test_increment_intp (int *intp)
 {
-  *intp += 1;
+  if (intp != NULL)
+    *intp += 1;
   return 1; /* TRUE in case we're connected to event signals */
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]