diff options
author | Nick Schermer <nick@xfce.org> | 2012-09-28 20:38:33 +0200 |
---|---|---|
committer | Nick Schermer <nick@xfce.org> | 2012-09-28 20:38:33 +0200 |
commit | 1c0e847306b687ae6ca7de7ac6d374d24e0a37b9 (patch) | |
tree | 9d252776a45e1f6b7b9a1759cf26e85e1385c277 /plugins | |
parent | b1599bc6b8fd64588468d88387e1ea20bcbe889d (diff) | |
download | thunar-1c0e847306b687ae6ca7de7ac6d374d24e0a37b9.tar.gz |
Allow editing desktop that are empty.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/thunar-apr/thunar-apr-desktop-page.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/thunar-apr/thunar-apr-desktop-page.c b/plugins/thunar-apr/thunar-apr-desktop-page.c index b525b904..d90ab370 100644 --- a/plugins/thunar-apr/thunar-apr-desktop-page.c +++ b/plugins/thunar-apr/thunar-apr-desktop-page.c @@ -557,7 +557,7 @@ thunar_apr_desktop_page_save (ThunarAprDesktopPage *desktop_page, /* determine the content of the key file */ data = g_key_file_to_data (key_file, &data_length, &error); - if (G_LIKELY (data != NULL)) + if (G_LIKELY (data_length > 0)) { /* try to save the key file content to disk */ fp = fopen (filename, "w"); @@ -571,10 +571,10 @@ thunar_apr_desktop_page_save (ThunarAprDesktopPage *desktop_page, { error = g_error_new_literal (G_FILE_ERROR, g_file_error_from_errno (errno), g_strerror (errno)); } - - /* cleanup */ - g_free (data); } + + /* cleanup */ + g_free (data); } /* check if we succeed */ |