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
This commit is contained in:
Sebastian Dröge 2016-11-07 12:24:59 +02:00
parent a424f04a22
commit 56ee6c4cee

View file

@ -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 *