From b7194f41401f9f5ce1909b50a1c38e9b1f60b677 Mon Sep 17 00:00:00 2001 From: herbelin Date: Wed, 19 Sep 2001 15:13:09 +0000 Subject: Protection hd d'une liste vide git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2002 85f007b7-540e-0410-9357-904b9bb8a0f7 --- toplevel/mltop.ml4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toplevel/mltop.ml4 b/toplevel/mltop.ml4 index 51271b510d..3e97b30f70 100644 --- a/toplevel/mltop.ml4 +++ b/toplevel/mltop.ml4 @@ -166,7 +166,7 @@ let add_rec_path dir coq_dirpath = List.iter (fun lpe -> add_ml_dir (fst lpe)) dirs; List.iter Library.add_load_path_entry dirs; if coq_dirpath <> [] then Nametab.push_library_root (List.hd coq_dirpath) - else List.iter (fun (_, cp) -> Nametab.push_library_root (List.hd cp)) dirs + else List.iter (fun (_, cp) -> if cp <> [] then Nametab.push_library_root (List.hd cp)) dirs end else wARNING [< 'sTR ("Cannot open " ^ dir) >] -- cgit v1.2.3