Adds null check to receive function.
@@ -61,10 +61,12 @@ public class Screen extends Component implements Receiver<String> {
@Override
public void receive(final String event, final String data) {
+ if (radio != null) {
if (event.equals("DRAW")) {
transmitDraw();
}
}
+ }
private void parseJSON(final @NonNull JSONObject jsonObject) {
final JSONArray components = (JSONArray) jsonObject.get("components");
