diff --git a/src/rviz/properties/property.cpp b/src/rviz/properties/property.cpp index 526441a2d..df0fb7433 100644 --- a/src/rviz/properties/property.cpp +++ b/src/rviz/properties/property.cpp @@ -397,7 +397,10 @@ void Property::setModel(PropertyTreeModel* model) if (model_ && hidden_) { // process propertyHiddenChanged after insertion into model has finished - QTimer::singleShot(0, model_, [this]() { model_->emitPropertyHiddenChanged(this); }); + QTimer::singleShot(0, model_, [this]() { + if (model_) + model_->emitPropertyHiddenChanged(this); + }); } int num_children = numChildren(); for (int i = 0; i < num_children; i++)