Skip to content

Commit a064e37

Browse files
ThomasH99shai-almog
authored andcommitted
Fixed a nullPointer issue in TextField.initComponent where getComponentForm() may return null but this was not tested for (many other components make this test)
1 parent 8bc0675 commit a064e37

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,11 @@ void initComponentImpl() {
15661566
keyBack = rtl ? Display.GAME_RIGHT : Display.GAME_LEFT;
15671567

15681568
// text field relies too much on animation to use internal animations
1569-
getComponentForm().registerAnimated(this);
1569+
// getComponentForm().registerAnimated(this);
1570+
Form f = getComponentForm();
1571+
if(f != null) {
1572+
f.registerAnimated(this);
1573+
}
15701574
}
15711575

15721576
/**

0 commit comments

Comments
 (0)