diff options
author | Vojtech Bubnik <bubnikv@gmail.com> | 2021-12-21 12:34:55 +0300 |
---|---|---|
committer | Vojtech Bubnik <bubnikv@gmail.com> | 2021-12-21 12:34:55 +0300 |
commit | 53af2fc0b8fc4a197570b654668cc81e8952d10b (patch) | |
tree | e4c995762abe04b93871c31b507b42828557258b /src/slic3r | |
parent | 0e419b265fc5ee457c0f16a0a113aa0ec2c3ea00 (diff) |
Fixed crash in send system info dialog due to empty prerelease string.
Diffstat (limited to 'src/slic3r')
-rw-r--r-- | src/slic3r/GUI/SendSystemInfoDialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/slic3r/GUI/SendSystemInfoDialog.cpp b/src/slic3r/GUI/SendSystemInfoDialog.cpp index 0bfb343b8..e8e23a44e 100644 --- a/src/slic3r/GUI/SendSystemInfoDialog.cpp +++ b/src/slic3r/GUI/SendSystemInfoDialog.cpp @@ -556,8 +556,8 @@ SendSystemInfoDialog::SendSystemInfoDialog(wxWindow* parent) std::string app_name; { Semver semver(SLIC3R_VERSION); - bool is_alpha = std::string{semver.prerelease()}.find("alpha") != std::string::npos; - bool is_beta = std::string{semver.prerelease()}.find("beta") != std::string::npos; + bool is_alpha = semver.prerelease() && std::string{semver.prerelease()}.find("alpha") != std::string::npos; + bool is_beta = semver.prerelease() && std::string{semver.prerelease()}.find("beta") != std::string::npos; app_name = std::string(SLIC3R_APP_NAME) + " " + std::to_string(semver.maj()) + "." + std::to_string(semver.min()) + " " + (is_alpha ? "Alpha" : is_beta ? "Beta" : ""); |