diff options
| author | Andrea Corallo | 2020-03-18 20:00:43 +0000 |
|---|---|---|
| committer | Andrea Corallo | 2020-03-18 20:00:43 +0000 |
| commit | 0179d95630ff5864c14b8dfcefaa131ecd44c1e2 (patch) | |
| tree | 5b564f970a22d68bd23f84f02d5dfbb964e9e2f7 /src | |
| parent | 7565a4a1170bf36352ffd7283c18ac1843ae8123 (diff) | |
| download | emacs-0179d95630ff5864c14b8dfcefaa131ecd44c1e2.tar.gz emacs-0179d95630ff5864c14b8dfcefaa131ecd44c1e2.zip | |
* comp.c (native-elisp-load): Guard against misisng file.
Diffstat (limited to 'src')
| -rw-r--r-- | src/comp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/comp.c b/src/comp.c index d645b59590f..55e6e96ec81 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -3566,7 +3566,9 @@ DEFUN ("native-elisp-load", Fnative_elisp_load, Snative_elisp_load, 1, 2, 0, | |||
| 3566 | (Lisp_Object file, Lisp_Object late_load) | 3566 | (Lisp_Object file, Lisp_Object late_load) |
| 3567 | { | 3567 | { |
| 3568 | CHECK_STRING (file); | 3568 | CHECK_STRING (file); |
| 3569 | 3569 | if (NILP (Ffile_exists_p (file))) | |
| 3570 | xsignal2 (Qnative_lisp_load_failed, build_string ("file does not exists"), | ||
| 3571 | file); | ||
| 3570 | struct Lisp_Native_Comp_Unit *comp_u = allocate_native_comp_unit(); | 3572 | struct Lisp_Native_Comp_Unit *comp_u = allocate_native_comp_unit(); |
| 3571 | comp_u->handle = dynlib_open (SSDATA (file)); | 3573 | comp_u->handle = dynlib_open (SSDATA (file)); |
| 3572 | if (!comp_u->handle) | 3574 | if (!comp_u->handle) |