add missing variable checks in various places

This commit is contained in:
Mark Thom
2021-02-17 11:12:19 -07:00
parent e9ba3ad223
commit 00bf39204d
2 changed files with 4 additions and 2 deletions

View File

@@ -261,7 +261,8 @@ call_or_cut(M:G, B) :-
; call(M:G)
).
call_or_cut(G, B) :-
( '$call_with_default_policy'(control_functor(G)) ->
( nonvar(G),
'$call_with_default_policy'(control_functor(G)) ->
'$call_with_default_policy'(call_or_cut_interp(G, B))
; call(G)
).

View File

@@ -440,7 +440,8 @@ predicate_property(Callable, Property) :-
; functor(Callable, (:), 2),
arg(1, Callable, Module),
arg(2, Callable, Callable0),
atom(Module) ->
atom(Module),
nonvar(Callable0) ->
functor(Callable0, Name, Arity),
( atom(Name),
Name \== [] ->