diff options
Diffstat (limited to 'components/text/nautilus-text-view.c')
-rw-r--r-- | components/text/nautilus-text-view.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/text/nautilus-text-view.c b/components/text/nautilus-text-view.c index a693a2053..547dd07f9 100644 --- a/components/text/nautilus-text-view.c +++ b/components/text/nautilus-text-view.c @@ -118,6 +118,13 @@ read_file_callback (GnomeVFSResult result, return; } + /* If the file has zero size file_contents will be NULL, so we just + report loading is complete and return. */ + if (file_size == 0) { + nautilus_view_report_load_complete (view); + return; + } + /* Find first embedded zero, if any */ length = my_strnlen (file_contents, file_size); |