shell-recorder: Ensure we remove the redraw timeout on finalize

Otherwise we may end up using freed memory and crashing

https://bugzilla.gnome.org/show_bug.cgi?id=767001
This commit is contained in:
Rui Matos 2016-06-06 20:26:28 +02:00
parent 21ddbf0b8f
commit c91085caf7

View File

@ -107,6 +107,8 @@ static void recorder_set_draw_cursor (ShellRecorder *recorder,
static void recorder_pipeline_set_caps (RecorderPipeline *pipeline);
static void recorder_pipeline_closed (RecorderPipeline *pipeline);
static void recorder_remove_redraw_timeout (ShellRecorder *recorder);
enum {
PROP_0,
PROP_SCREEN,
@ -235,6 +237,8 @@ shell_recorder_finalize (GObject *object)
recorder_set_pipeline (recorder, NULL);
recorder_set_file_template (recorder, NULL);
recorder_remove_redraw_timeout (recorder);
g_clear_object (&recorder->a11y_settings);
G_OBJECT_CLASS (shell_recorder_parent_class)->finalize (object);