From a2286354c8dcd9c88004b7175a1046493fb10646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Mon, 22 Nov 2010 18:07:01 +0000 Subject: [PATCH] fix shared object stuff (obs from Roberto Bagnara). --- C/load_foreign.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C/load_foreign.c b/C/load_foreign.c index 13c86b782..ead46aa76 100755 --- a/C/load_foreign.c +++ b/C/load_foreign.c @@ -261,7 +261,8 @@ Yap_ReOpenLoadForeign(void) while (f_code != NULL) { CurrentModule = f_code->module; if(Yap_ReLoadForeign(f_code->objs,f_code->libs,f_code->f,&InitProc)==LOAD_SUCCEEDED) { - (*InitProc)(); + if (InitProc) + (*InitProc)(); } f_code = f_code->next; }