Skip to content

Commit bf566c8

Browse files
authored
Workaround for EDT violation in user code (#4727)
Fixed #4726 Signed-off-by: Shai Almog <67850168+shai-almog@users.noreply.github.com>
1 parent 04d423a commit bf566c8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CodenameOne/src/com/codename1/ui/ComboBox.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,13 @@ protected void fireClicked() {
485485
l.eventSource = this;
486486
l.disposeDialogOnSelection = true;
487487
Form parentForm = getComponentForm();
488-
//l.getSelectedStyle().setBorder(null);
489488

489+
// unlikely to ever happen but occurs on EDT violations
490+
// github.com/codenameone/CodenameOne/issues/4726
491+
if (parentForm == null) {
492+
return;
493+
}
494+
490495
int tint = parentForm.getTintColor();
491496
parentForm.setTintColor(0);
492497
Dialog popupDialog = createPopupDialog(l);

0 commit comments

Comments
 (0)