From 56ee6c4cee643f12d95a53aca0506b999cae29e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 7 Nov 2016 12:24:59 +0200 Subject: [PATCH] ahs: Don't assert on deinit if initialization failed before Initialization failure is handled correctly by just not registering the ahssrc element. https://bugzilla.gnome.org/show_bug.cgi?id=774048 --- sys/androidmedia/gst-android-hardware-sensor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/androidmedia/gst-android-hardware-sensor.c b/sys/androidmedia/gst-android-hardware-sensor.c index 862e9fbf48..d4fd71caf1 100644 --- a/sys/androidmedia/gst-android-hardware-sensor.c +++ b/sys/androidmedia/gst-android-hardware-sensor.c @@ -154,8 +154,6 @@ gst_ah_sensor_sensor_sizes_init (void) static void gst_ah_sensor_sensor_sizes_deinit (void) { - g_assert_nonnull (sensor_sizes); - g_hash_table_unref (sensor_sizes); sensor_sizes = NULL; } @@ -653,7 +651,8 @@ gst_android_hardware_sensor_deinit (void) org_freedesktop_gstreamer_androidmedia_gstahscallback.klass = NULL; } - gst_ah_sensor_sensor_sizes_deinit (); + if (sensor_sizes) + gst_ah_sensor_sensor_sizes_deinit (); } GstAHSensorManager *