Update of /cvsroot/jython/htdocs/applets
In directory slayer.i.sourceforge.net:/tmp/cvs-serv28790
Modified Files:
JythonLoader.java
Log Message:
activeApplets(): In netscape the getApplet("name") call may throw an NPE
when the name does not exists.
Index: JythonLoader.java
===================================================================
RCS file: /cvsroot/jython/htdocs/applets/JythonLoader.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** JythonLoader.java 2000/11/14 20:35:12 1.2
--- JythonLoader.java 2000/11/30 08:59:11 1.3
***************
*** 56,62 ****
private int activeApplets() {
! Applet a = getAppletContext().getApplet(waitFor);
! if (a != null)
! return 2;
return 1;
}
--- 56,66 ----
private int activeApplets() {
! try {
! Applet a = getAppletContext().getApplet(waitFor);
! if (a != null)
! return 2;
! } catch (Exception ex) {
! return 1;
! }
return 1;
}
|