Gui: check for null document name

Make the check for null document name more obvious.
This commit is contained in:
Ladislav Michl
2025-09-10 07:51:59 +02:00
committed by Kacper Donat
parent 58a8d589a7
commit 8e7e9c4bbc

View File

@@ -234,8 +234,7 @@ std::string ViewProviderPlane::getRole() const
{
// Note: Role property of App::Plane is not set yet when attaching.
const char* name = pcObject->getNameInDocument();
if (!pcObject->isAttachedToDocument()) {
if (!name) {
return "";
}