From 1aef8e0246a844c48538f406b692cfbc53b0c5f5 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 6 May 2022 15:14:37 +0200 Subject: [PATCH] App: cannot assign a null pointer to a std::string Depending on the compiler an exception is raised or a crash occurs --- src/App/Link.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App/Link.cpp b/src/App/Link.cpp index 7c8ad8d91e..471f90290e 100644 --- a/src/App/Link.cpp +++ b/src/App/Link.cpp @@ -476,9 +476,9 @@ void LinkBaseExtension::setOnChangeCopyObject( const char *key = flags.testFlag(OnChangeCopyOptions::ApplyAll) ? "*" : parent->getNameInDocument(); if (external) - prop->setValue(key, exclude ? nullptr : "+"); + prop->setValue(key, exclude ? "" : "+"); else - prop->setValue(key, exclude ? "-" : nullptr); + prop->setValue(key, exclude ? "-" : ""); } // The purpose of this function is to synchronize the mutated copy to the