[gupnp] Ensure that the callback is NULL



commit 147b74c8dd092a0f2e39925822966af9ece82521
Author: Jens Georg <mail jensge org>
Date:   Mon Feb 13 13:03:48 2012 +0200

    Ensure that the callback is NULL

 libgupnp/gupnp-service.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/libgupnp/gupnp-service.c b/libgupnp/gupnp-service.c
index 9521296..6ae5234 100644
--- a/libgupnp/gupnp-service.c
+++ b/libgupnp/gupnp-service.c
@@ -2092,9 +2092,10 @@ find_callback_by_name (GModule    *module,
                                        "cb",
                                        NULL);
 
-                g_module_symbol (module,
-                                 full_name,
-                                 (gpointer) &callback);
+                if (!g_module_symbol (module,
+                                      full_name,
+                                      (gpointer) &callback))
+                        callback = NULL;
         }
 
         g_free (full_name);



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