[gnome-builder] beautifier plugin: check before delete tmp files
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] beautifier plugin: check before delete tmp files
- Date: Thu, 12 Jan 2017 22:25:07 +0000 (UTC)
commit 2ff6a195922555bac06716c714cab61973a88dd2
Author: Sebastien Lafargue <slafargue gnome org>
Date: Sun Dec 4 00:36:46 2016 +0100
beautifier plugin: check before delete tmp files
plugins/beautifier/gb-beautifier-process.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/plugins/beautifier/gb-beautifier-process.c b/plugins/beautifier/gb-beautifier-process.c
index 0b9e137..3d95ce3 100644
--- a/plugins/beautifier/gb-beautifier-process.c
+++ b/plugins/beautifier/gb-beautifier-process.c
@@ -58,9 +58,12 @@ process_state_free (gpointer data)
g_clear_object (&state->src_file);
g_clear_object (&state->config_file);
- g_file_delete (state->tmp_config_file, NULL, NULL);
- g_file_delete (state->tmp_src_file, NULL, NULL);
- g_file_delete (state->tmp_workdir_file, NULL, NULL);
+ if (state->tmp_config_file != NULL)
+ g_file_delete (state->tmp_config_file, NULL, NULL);
+ if (state->tmp_src_file != NULL)
+ g_file_delete (state->tmp_src_file, NULL, NULL);
+ if (state->tmp_workdir_file != NULL)
+ g_file_delete (state->tmp_workdir_file, NULL, NULL);
g_clear_object (&state->tmp_workdir_file);
g_clear_object (&state->tmp_config_file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]