summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/kpathsea/elt-dirs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Build/source/texk/kpathsea/elt-dirs.c b/Build/source/texk/kpathsea/elt-dirs.c
index 799cca705f6..76fca5513b4 100644
--- a/Build/source/texk/kpathsea/elt-dirs.c
+++ b/Build/source/texk/kpathsea/elt-dirs.c
@@ -409,6 +409,10 @@ kpathsea_element_dirs (kpathsea kpse, string elt)
str_llist_type *ret;
unsigned i;
+ /* If given nothing, return nothing. */
+ if (!elt || !*elt)
+ return NULL;
+
#ifdef _WIN32
/*
Change encoding of a variable into kpse->File_system_codepage
@@ -426,10 +430,6 @@ kpathsea_element_dirs (kpathsea kpse, string elt)
}
#endif
- /* If given nothing, return nothing. */
- if (!elt || !*elt)
- return NULL;
-
/* Normalize ELT before looking for a cached value. */
i = kpathsea_normalize_path (kpse, elt);