Prevent unnecessary error messages while loading a part

This commit is contained in:
jrheinlaender
2013-07-07 11:31:14 +02:00
committed by Stefan Tröger
parent 2d0fdac40b
commit 5de7ac36c9
5 changed files with 18 additions and 8 deletions

View File

@@ -55,7 +55,9 @@ ViewProviderPad::~ViewProviderPad()
std::vector<App::DocumentObject*> ViewProviderPad::claimChildren(void)const
{
std::vector<App::DocumentObject*> temp;
temp.push_back(static_cast<PartDesign::Pad*>(getObject())->Sketch.getValue());
App::DocumentObject* sketch = static_cast<PartDesign::Pad*>(getObject())->Sketch.getValue();
if (sketch != NULL)
temp.push_back(sketch);
return temp;
}