Skip to content

Commit

Permalink
Fix getId of nullptr car_user
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Dec 14, 2023
1 parent 4eab58b commit a6a0647
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/backend/src/room/Room.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Room
else
this->owner = nullptr;
}
if (this->car_user->getId() == user.getId()) {
if (this->car_user != nullptr && this->car_user->getId() == user.getId()) {
this->car_user = nullptr;
}
}
Expand Down

0 comments on commit a6a0647

Please sign in to comment.