File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
CodenameOne/src/com/codename1/ui Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -635,11 +635,13 @@ protected void removeCommand(Command cmd) {
635635 leftCommands .remove (cmd );
636636 }
637637 if (getCommandCount () == 0 ) {
638- if (getTitleComponent () != null ) {
638+ if (getTitleComponent () != null && getTitleComponent (). getParent () != null ) {
639639 getTitleComponent ().getParent ().removeAll ();
640640 }
641- getTitleAreaContainer ().removeAll ();
642- getTitleAreaContainer ().addComponent (BorderLayout .CENTER , getTitleComponent ());
641+ if (getTitleAreaContainer () != null ) {
642+ getTitleAreaContainer ().removeAll ();
643+ getTitleAreaContainer ().addComponent (BorderLayout .CENTER , getTitleComponent ());
644+ }
643645 }
644646 installRightCommands ();
645647 installLeftCommands ();
You can’t perform that action at this time.
0 commit comments