Skip to content

Commit

Permalink
Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Apr 4, 2024
1 parent 1c53e95 commit d88ee79
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ protected void onCreate(final Bundle savedInstanceState) {
// initialize debug logging mechanism
Logger.init(getExternalFilesDir(null));

updateOrientation();

setContentView(R.layout.activity_main);
menu = Menu.get();
clientList = findViewById(R.id.clientList);
createClientView();
// NOTE: client view instance must be created before initializing menu
menu = Menu.get();
updateOrientation();
} catch (final Exception e) {
// TODO: add option to save to file or copy to clipboard the error
e.printStackTrace();
Expand Down Expand Up @@ -107,9 +107,9 @@ public void onBackPressed() {
*/
private void createClientView() {
final ClientView clientView = new ClientView(this);
clientView.loadTitleScreen();
setActiveClientView(clientView);
clientList.addView(clientView);
clientView.loadTitleScreen();
}

/**
Expand Down

0 comments on commit d88ee79

Please sign in to comment.