Skip to content

Commit

Permalink
Merge pull request #2451 from rayw-dronesense/fix-camera-crash
Browse files Browse the repository at this point in the history
Fixes MAVSDK-Java#155 camera::possibleSettingOptions crashes as a result of erroneous string format
  • Loading branch information
julianoes authored Nov 27, 2024
2 parents eba055b + a0bc0db commit 7f2a9dd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/mavsdk/plugins/camera/camera_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1848,10 +1848,8 @@ bool CameraImpl::get_possible_options(
}

for (const auto& value : values) {
std::stringstream ss{};
ss << value;
Camera::Option option{};
option.option_id = ss.str();
option.option_id = value.get_string();
if (!is_setting_range(setting_id)) {
get_option_str(setting_id, option.option_id, option.option_description);
}
Expand Down

0 comments on commit 7f2a9dd

Please sign in to comment.