Guard against possible NullPointerException if the Context has not been properly entered.

git-svn-id: svn://10.0.0.236/trunk@61794 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
norris%netscape.com
2000-02-28 18:40:34 +00:00
parent 612a23d049
commit d8a63e199d
2 changed files with 2 additions and 2 deletions

View File

@@ -60,7 +60,7 @@ public class OptIRFactory extends IRFactory {
(Node) statements,
nameHelper);
Context cx = Context.getCurrentContext();
if (cx.getDebugLevel() > 0)
if (cx != null && cx.getDebugLevel() > 0)
result.setRequiresActivation(true);
return result;
}

View File

@@ -60,7 +60,7 @@ public class OptIRFactory extends IRFactory {
(Node) statements,
nameHelper);
Context cx = Context.getCurrentContext();
if (cx.getDebugLevel() > 0)
if (cx != null && cx.getDebugLevel() > 0)
result.setRequiresActivation(true);
return result;
}