From 10c2e35112d43c06fc715014b33094761f01c992 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Wed, 9 Apr 2014 14:58:01 +0200 Subject: Remove unnecessary allocation We now require libpyloncam 0.3.0 or better and got rid of a unnecessary memory check and allocation --- plugins/pylon/uca-pylon-camera.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'plugins/pylon/uca-pylon-camera.c') diff --git a/plugins/pylon/uca-pylon-camera.c b/plugins/pylon/uca-pylon-camera.c index 069d573..02d6795 100644 --- a/plugins/pylon/uca-pylon-camera.c +++ b/plugins/pylon/uca-pylon-camera.c @@ -126,12 +126,8 @@ static void uca_pylon_camera_stop_recording(UcaCamera *camera, GError **error) static gboolean uca_pylon_camera_grab(UcaCamera *camera, gpointer data, GError **error) { g_return_val_if_fail(UCA_IS_PYLON_CAMERA(camera), FALSE); - UcaPylonCameraPrivate *priv = UCA_PYLON_CAMERA_GET_PRIVATE(camera); - if (data == NULL) { - data = g_malloc0(priv->roi_width * priv->roi_height * priv->num_bytes); - } - pylon_camera_grab(&data, error); + pylon_camera_grab(data, error); return TRUE; } -- cgit v1.2.3