diff --git a/Project/Sprint2/app/src/main/java/com/example/sprint1/view/HomeLog.java b/Project/Sprint2/app/src/main/java/com/example/sprint1/view/HomeLog.java index 1694bff..ee5f241 100644 --- a/Project/Sprint2/app/src/main/java/com/example/sprint1/view/HomeLog.java +++ b/Project/Sprint2/app/src/main/java/com/example/sprint1/view/HomeLog.java @@ -59,14 +59,14 @@ private void buttonVisualization() { pieChart.animateY(1000, Easing.EaseInOutQuad); - mainViewModel.getVacation( - vacationData -> mainViewModel.calVacation( - arrangedDaysStr -> updateVisualization( - Integer.parseInt(arrangedDaysStr), - Integer.parseInt(Objects.requireNonNull(vacationData.get("duration"))) - ) - ) - ); + mainViewModel.getVacation(vacationData -> { + if (vacationData != null) { + mainViewModel.calVacation(arrangedDaysStr -> updateVisualization( + Integer.parseInt(arrangedDaysStr), + Integer.parseInt(Objects.requireNonNull(vacationData.get("duration"))) + )); + } + }); } private void updateVisualization(int arrangedDays, int totalDays) {