[prevent][42870] Fix for null pointer dereference
[platform/upstream/at-spi2-core.git] / atspi / atspi-device-listener.c
index 9d2796e..3ac4451 100644 (file)
@@ -115,7 +115,7 @@ id_is_free (guint id)
 }
 
 static AtspiDeviceEvent *
-atspi_device_event_copy (AtspiDeviceEvent *src)
+atspi_device_event_copy (const AtspiDeviceEvent *src)
 {
   AtspiDeviceEvent *dst = g_new0 (AtspiDeviceEvent, 1);
   dst->type = src->type;
@@ -230,7 +230,7 @@ atspi_device_listener_new (AtspiDeviceListenerCB callback,
 }
 
 /**
- * atspi_device_listener_new_simple:
+ * atspi_device_listener_new_simple: (skip)
  * @callback: (scope notified): an #AtspiDeviceListenerCB callback function,
  *            or NULL.
  * @callback_destroyed: A #GDestroyNotify called when the listener is freed
@@ -247,7 +247,7 @@ AtspiDeviceListener *
 atspi_device_listener_new_simple (AtspiDeviceListenerSimpleCB callback,
                            GDestroyNotify callback_destroyed)
 {
-  return atspi_device_listener_new (device_remove_datum, callback_destroyed, callback);
+  return atspi_device_listener_new (device_remove_datum, callback, callback_destroyed);
 }
 
 /**