Changeset 4940


Ignore:
Timestamp:
12/02/03 14:27:20 (17 years ago)
Author:
dmcnaught
Message:

Fixed JINSTANCE-OF-P to not crash on non-Java-objects

File:
1 edited

Legend:

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

    r4884 r4940  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: java.lisp,v 1.6 2003-11-24 15:57:39 piso Exp $
     4;;; $Id: java.lisp,v 1.7 2003-12-02 14:27:20 dmcnaught Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    9191(defun jinstance-of-p (obj class)
    9292  "OBJ is an instance of CLASS (or one of its subclasses)"
    93   (jcall (jmethod "java.lang.Class" "isInstance" "java.lang.Object") class obj))
     93  (and (java-object-p obj)
     94       (jcall (jmethod "java.lang.Class" "isInstance" "java.lang.Object") class obj)))
    9495
    9596(defun jmember-static-p (member)
Note: See TracChangeset for help on using the changeset viewer.