[Gui] Fix Seg Fault when deleting a Link Array

This commit is contained in:
Syres916
2025-03-26 13:34:15 +00:00
committed by Benjamin Nauck
parent 9d9ee7d9c3
commit 06b0cbc59f

View File

@@ -2390,7 +2390,7 @@ bool ViewProviderLink::onDelete(const std::vector<std::string> &) {
}
auto link = getObject<App::Link>();
if (link->ElementCount.getValue() != 0) {
if (link && link->ElementCount.getValue() != 0) {
auto doc = link->getDocument();
auto elements = link->ElementList.getValues();
for (auto element : elements) {