[gimp] app: don't leak the gimpdir GFile in app_run()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't leak the gimpdir GFile in app_run()
- Date: Mon, 6 Oct 2014 18:36:50 +0000 (UTC)
commit 230e03ac40e03747ac586c45354459da26849fc9
Author: Michael Natterer <mitch gimp org>
Date: Mon Oct 6 20:33:47 2014 +0200
app: don't leak the gimpdir GFile in app_run()
app/app.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/app/app.c b/app/app.c
index 753d3f7..22f0a6f 100644
--- a/app/app.c
+++ b/app/app.c
@@ -164,6 +164,7 @@ app_run (const gchar *full_prog_name,
GMainLoop *loop;
GMainLoop *run_loop;
GFile *default_folder = NULL;
+ GFile *gimpdir;
if (filenames && filenames[0] && ! filenames[1] &&
g_file_test (filenames[0], G_FILE_TEST_IS_DIR))
@@ -213,8 +214,9 @@ app_run (const gchar *full_prog_name,
/* Check if the user's gimp_directory exists
*/
- if (g_file_query_file_type (gimp_directory_file (NULL),
- G_FILE_QUERY_INFO_NONE, NULL) !=
+ gimpdir = gimp_directory_file (NULL);
+
+ if (g_file_query_file_type (gimpdir, G_FILE_QUERY_INFO_NONE, NULL) !=
G_FILE_TYPE_DIRECTORY)
{
GimpUserInstall *install = gimp_user_install_new (be_verbose);
@@ -231,6 +233,8 @@ app_run (const gchar *full_prog_name,
gimp_user_install_free (install);
}
+ g_object_unref (gimpdir);
+
gimp_load_config (gimp, alternate_system_gimprc, alternate_gimprc);
/* change the locale if a language if specified */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]