Changeset 4836


Ignore:
Timestamp:
11/19/03 14:45:53 (18 years ago)
Author:
piso
Message:

BOUNDP: avoid NPE if dynEnv is null.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Primitives.java

    r4833 r4836  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.503 2003-11-19 13:43:42 piso Exp $
     5 * $Id: Primitives.java,v 1.504 2003-11-19 14:45:53 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    783783        {
    784784            Symbol symbol = checkSymbol(obj);
    785             Environment dynEnv =
    786                 LispThread.currentThread().getDynamicEnvironment();
    787785            // PROGV: "If too few values are supplied, the remaining symbols
    788786            // are bound and then made to have no value." So BOUNDP must
    789787            // explicitly check for a binding with no value.
    790             Binding binding = dynEnv.getBinding(symbol);
    791             if (binding != null)
    792                 return binding.value != null ? T : NIL;
     788            Environment dynEnv =
     789                LispThread.currentThread().getDynamicEnvironment();
     790            if (dynEnv != null) {
     791                Binding binding = dynEnv.getBinding(symbol);
     792                if (binding != null)
     793                    return binding.value != null ? T : NIL;
     794            }
    793795            // No binding.
    794796            return symbol.getSymbolValue() != null ? T : NIL;
Note: See TracChangeset for help on using the changeset viewer.