diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2014-10-21 09:55:24 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2014-10-21 09:55:24 +0200 |
commit | 7cbc8b3a10e3cfd67b3bc4102c6b8fb95dc06f29 (patch) | |
tree | 6633f4609cb2fa6045b569343e1599119d548a21 /src | |
parent | f1198fac7cb7e0817fe11cacdc0a314aa45536f2 (diff) | |
download | uca-7cbc8b3a10e3cfd67b3bc4102c6b8fb95dc06f29.tar.gz uca-7cbc8b3a10e3cfd67b3bc4102c6b8fb95dc06f29.tar.bz2 uca-7cbc8b3a10e3cfd67b3bc4102c6b8fb95dc06f29.tar.xz uca-7cbc8b3a10e3cfd67b3bc4102c6b8fb95dc06f29.zip |
Fix printing non-existent error
This caused a segfault when unreffing a camera object which was still recording
but stopping it was not failing.
Diffstat (limited to 'src')
-rw-r--r-- | src/uca-camera.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/uca-camera.c b/src/uca-camera.c index 9c90f1a..ef5f671 100644 --- a/src/uca-camera.c +++ b/src/uca-camera.c @@ -283,11 +283,14 @@ uca_camera_dispose (GObject *object) priv = UCA_CAMERA_GET_PRIVATE (object); if (priv->is_recording) { - GError *error; + GError *error = NULL; uca_camera_stop_recording (UCA_CAMERA (object), &error); - g_warning ("Could not stop recording: %s", error->message); - g_error_free (error); + + if (error != NULL) { + g_warning ("Could not stop recording: %p", error->message); + g_error_free (error); + } } if (priv->ring_buffer != NULL) { |