App: cannot assign a null pointer to a std::string

Depending on the compiler an exception is raised or a crash occurs
This commit is contained in:
wmayer
2022-05-06 15:14:37 +02:00
parent a94d76874f
commit 1aef8e0246

View File

@@ -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