From: Rodrigo Kumpera Date: Mon, 30 Mar 2015 15:07:54 +0000 (-0400) Subject: [runtime] Fix the build. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=7d318ea4fa1806e807da6a99a6f2aa931202e6b8;p=mono.git [runtime] Fix the build. --- diff --git a/mono/metadata/file-io.c b/mono/metadata/file-io.c index b4d0630f844..c4bb6df6765 100644 --- a/mono/metadata/file-io.c +++ b/mono/metadata/file-io.c @@ -379,9 +379,11 @@ get_filesystem_entries (MonoString *path, g_free (utf8_path); return names; fail: - for (i = 0; i < names->len; i++) - g_free (g_ptr_array_index (names, i)); - g_ptr_array_free (names, TRUE); + if (names) { + for (i = 0; i < names->len; i++) + g_free (g_ptr_array_index (names, i)); + g_ptr_array_free (names, TRUE); + } g_free (utf8_path); return FALSE; }