Skip to content

Commit

Permalink
bugfix: NullPointerException in MyControl.describe()
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Mar 13, 2024
1 parent 0a92c40 commit 047a8ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion HeartLibrary/src/main/java/jme3utilities/MyControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ public static String describe(Control control) {
CameraControl.ControlDirection direction
= cameraControl.getControlDir();
Camera camera = cameraControl.getCamera();
String quotedName = MyString.quoteName(camera.getName());
String name = (camera == null) ? null : camera.getName();
String quotedName = MyString.quoteName(name);

result.append('[');
result.append(direction);
Expand Down

0 comments on commit 047a8ad

Please sign in to comment.