mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
app: Use g_clear_object() in main.c
Also no need to do a null-check if you're doing g_free(), it can handle that already.
This commit is contained in:
parent
b2c715b52b
commit
bba495999d
1 changed files with 5 additions and 12 deletions
17
app/main.c
17
app/main.c
|
@ -483,11 +483,8 @@ gimp_early_configuration (void)
|
|||
|
||||
g_object_unref (earlyrc);
|
||||
|
||||
if (system_gimprc_file)
|
||||
g_object_unref (system_gimprc_file);
|
||||
|
||||
if (user_gimprc_file)
|
||||
g_object_unref (user_gimprc_file);
|
||||
g_clear_object (&system_gimprc_file);
|
||||
g_clear_object (&user_gimprc_file);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -785,14 +782,10 @@ main (int argc,
|
|||
pdb_compat_mode,
|
||||
backtrace_file);
|
||||
|
||||
if (backtrace_file)
|
||||
g_free (backtrace_file);
|
||||
g_free (backtrace_file);
|
||||
|
||||
if (system_gimprc_file)
|
||||
g_object_unref (system_gimprc_file);
|
||||
|
||||
if (user_gimprc_file)
|
||||
g_object_unref (user_gimprc_file);
|
||||
g_clear_object (&system_gimprc_file);
|
||||
g_clear_object (&user_gimprc_file);
|
||||
|
||||
g_strfreev (argv);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue