minor edit to previous commit, only show option to reload the file if its been saved.
[blender.git] / source / blender / windowmanager / intern / wm_files.c
index f9e931180338a476e1d4591f4bf4cd07b488f458..406dbd8ca9671311dca902dd04ba5ea8432cbc26 100644 (file)
@@ -327,7 +327,7 @@ static int wm_read_exotic(Scene *UNUSED(scene), const char *name)
        /* make sure we're not trying to read a directory.... */
 
        len = strlen(name);
-       if (ELEM(name[len - 1], '/', '\\')) {
+       if (len > 0 && ELEM(name[len - 1], '/', '\\')) {
                retval = BKE_READ_EXOTIC_FAIL_PATH;
        }
        else {