Skip to content

Commit

Permalink
Merge pull request #747 from Hunter19823/patch-1
Browse files Browse the repository at this point in the history
Fix a NPE issue with ConsoleJS
  • Loading branch information
LatvianModder authored Dec 26, 2023
2 parents 09038a1 + ddf578e commit 58a845f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class ConsoleJS {
public static ConsoleJS getCurrent(ConsoleJS def) {
Context cx = Context.getCurrentContext();

if (cx != null && cx.sharedContextData.getExtraProperty("Console") instanceof ConsoleJS c) {
if (cx != null && cx.sharedContextData != null && cx.sharedContextData.getExtraProperty("Console") instanceof ConsoleJS c) {
return c;
}

Expand Down

0 comments on commit 58a845f

Please sign in to comment.