Adds missing null check to Screen.
@@ -511,9 +511,11 @@ public class Screen extends Component implements Receiver<String> {
// Set up event listeners:
component.createEventListeners();
+ if (parentPanel != null) {
for (final EventListener eventListener : component.getEventListeners()) {
parentPanel.addListener(eventListener);
}
+ }
// Set the component's font
component.setFont(super.getFont());
