diff options
author | Tomas Bzatek <tbzatek@redhat.com> | 2011-01-27 11:22:10 +0100 |
---|---|---|
committer | Tomas Bzatek <tbzatek@redhat.com> | 2011-01-27 11:40:08 +0100 |
commit | b10ccbc58d8d7f2ebb9ded079ec2a36e2f4603ad (patch) | |
tree | 3dbd42fd79b3d32ec1945a0be161f264c8731585 | |
parent | c6aa31849de55c91d7f30787def931bd2d964640 (diff) | |
download | nautilus-b10ccbc58d8d7f2ebb9ded079ec2a36e2f4603ad.tar.gz |
Prevent a crash in nautilus_file_peek_display_name() on invalid NautilusFile
This is more a workaround only, expect assert failures at other
places when something bad happens. There's a race condition somewhere,
this patch only prevents immediate crash.
Patch by Marcus Husar <marcus.husar@rose.uni-heidelberg.de>
https://bugzilla.gnome.org/show_bug.cgi?id=602500
-rw-r--r-- | libnautilus-private/nautilus-file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c index 2c5b86835..c854163c4 100644 --- a/libnautilus-private/nautilus-file.c +++ b/libnautilus-private/nautilus-file.c @@ -3780,6 +3780,9 @@ nautilus_file_peek_display_name (NautilusFile *file) const char *name; char *escaped_name; + if (file == NULL || nautilus_file_is_gone (file)) + return ""; + /* Default to display name based on filename if its not set yet */ if (file->details->display_name == NULL) { |