From da04777a2556f94db3e04146671e9e428f84143e Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Wed, 27 May 2020 02:51:10 +1000 Subject: [PATCH] crashhandler: exclude GITHASH if git wasn't found Allows compilation in environments where Git may be missing. --- app/common/crashhandler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/common/crashhandler.cpp b/app/common/crashhandler.cpp index 615541493..469e45233 100644 --- a/app/common/crashhandler.cpp +++ b/app/common/crashhandler.cpp @@ -49,7 +49,10 @@ void crash_handler(int sig) output.open(QFile::WriteOnly); QTextStream ostream(&output); - ostream << "Version: " << GITHASH << "\nSignal: " << sig << "\n\n"; +#ifdef GITHASH + ostream << "Version: " << GITHASH << "\n"; +#endif + ostream << "Signal: " << sig << "\n\n"; #if defined(Q_OS_WINDOWS) // Use Windows stackwalk API