Fixed nullPointerException with internal frame auto-exit.