fix: Properly check if distro info exists before printing it
This commit is contained in:
parent
9cf3250751
commit
26af5987a5
@ -52,8 +52,9 @@ int main(int argc, char **argv) {
|
||||
log::info("Running on {} {} ({})", ImHexApi::System::getOSName(), ImHexApi::System::getOSVersion(), ImHexApi::System::getArchitecture());
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
auto distro = ImHexApi::System::getLinuxDistro().value();
|
||||
log::info("Linux distribution: {}. Version: {}", distro.name, distro.version == "" ? "None" : distro.version);
|
||||
if (auto distro = ImHexApi::System::getLinuxDistro(); distro.has_value()) {
|
||||
log::info("Linux distribution: {}. Version: {}", distro->name, distro->version == "" ? "None" : distro->version);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user