Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVojtech Bubnik <bubnikv@gmail.com>2021-12-21 12:34:55 +0300
committerVojtech Bubnik <bubnikv@gmail.com>2021-12-21 12:34:55 +0300
commit53af2fc0b8fc4a197570b654668cc81e8952d10b (patch)
treee4c995762abe04b93871c31b507b42828557258b /src/slic3r/GUI
parent0e419b265fc5ee457c0f16a0a113aa0ec2c3ea00 (diff)
Fixed crash in send system info dialog due to empty prerelease string.
Diffstat (limited to 'src/slic3r/GUI')
-rw-r--r--src/slic3r/GUI/SendSystemInfoDialog.cpp4
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" : "");