Skip to content

Instantly share code, notes, and snippets.

@scriptum
Created July 5, 2015 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scriptum/b967c28b67fd8291adfd to your computer and use it in GitHub Desktop.
Save scriptum/b967c28b67fd8291adfd to your computer and use it in GitHub Desktop.
diff --git a/Thunar/thunar/thunar-folder.c b/Thunar/thunar/thunar-folder.c
--- a/Thunar/thunar/thunar-folder.c
+++ b/Thunar/thunar/thunar-folder.c
@@ -769,7 +769,7 @@ thunar_folder_monitor (GFileMonitor *monitor,
}
}
- else if (event_type == G_FILE_MONITOR_EVENT_MOVED)
+ else if (event_type == G_FILE_MONITOR_EVENT_MOVED && other_file)
{
/* destroy the old file and update the new one */
thunar_file_destroy (lp->data);
diff --git a/Thunar/thunar/thunar-file.c b/Thunar/thunar/thunar-file.c
--- a/Thunar/thunar/thunar-file.c
+++ b/Thunar/thunar/thunar-file.c
@@ -890,7 +890,7 @@ thunar_file_info_clear (ThunarFile *file)
_thunar_return_if_fail (THUNAR_IS_FILE (file));
/* release the current file info */
- if (file->info != NULL)
+ if (file->info != NULL && G_IS_OBJECT(file->info))
{
g_object_unref (file->info);
file->info = NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment