java-gobject-introspection r112 - trunk/src/org/gnome/gir/gobject



Author: walters
Date: Thu Oct 30 22:18:24 2008
New Revision: 112
URL: http://svn.gnome.org/viewvc/java-gobject-introspection?rev=112&view=rev

Log:
Don't create destroy notifies for null callbacks

Modified:
   trunk/src/org/gnome/gir/gobject/GlibRuntime.java

Modified: trunk/src/org/gnome/gir/gobject/GlibRuntime.java
==============================================================================
--- trunk/src/org/gnome/gir/gobject/GlibRuntime.java	(original)
+++ trunk/src/org/gnome/gir/gobject/GlibRuntime.java	Thu Oct 30 22:18:24 2008
@@ -42,6 +42,9 @@
 		= Collections.synchronizedSet(new HashSet<CallbackData>());
 	
 	public static final GlibAPI.GDestroyNotify createDestroyNotify(Callback callback) {
+		if (callback == null)
+			return null;
+		
 		final CallbackData data = new CallbackData();
 		GlibAPI.GDestroyNotify destroy = new GlibAPI.GDestroyNotify() {
 			@Override



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