summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-11-07 12:24:59 +0200
committerSebastian Dröge <sebastian@centricular.com>2016-11-08 13:45:17 +0200
commit56ee6c4cee643f12d95a53aca0506b999cae29e3 (patch)
tree31c08d6a0b6bffe1d16472bdc78e158eea16101b /sys
parenta424f04a22ae5e05ebaba20344b211ff44d9074e (diff)
downloadgstreamer-plugins-bad-56ee6c4cee643f12d95a53aca0506b999cae29e3.tar.gz
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
Diffstat (limited to 'sys')
-rw-r--r--sys/androidmedia/gst-android-hardware-sensor.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/androidmedia/gst-android-hardware-sensor.c b/sys/androidmedia/gst-android-hardware-sensor.c
index 862e9fbf4..d4fd71caf 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 *