Commit ad9f8d22 authored by Leander Schulten's avatar Leander Schulten

main.cpp: Crash Fix: Fix crash through printing null pointer char* introduced...

main.cpp: Crash Fix: Fix crash through printing null pointer char* introduced here: e4a8bd3f
parent 971ff390
Pipeline #192354 passed with stage
in 5 minutes and 11 seconds
......@@ -65,10 +65,7 @@ int main(int argc, char *argv[]) {
QSharedMemory mem(QStringLiteral("Lichteuerung Leander Schulten"));
{ // check if the app is alreandy running or should be restarted
using namespace std::string_view_literals;
qDebug() << argv[0];
qDebug() << (argv[1] == "restart"sv);
const bool restart = argc > 1 && "restart"sv == argv[1];
qDebug() << restart;
if (restart) {
if (mem.attach()) {
// the app is still running, wait for end of app
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment