Fix possible crash in various view providers, fix formatting of Coin debug output, fix warning and compiler errors with Coin2 in SoDatumLabel
This commit is contained in:
@@ -115,7 +115,7 @@ bool ViewProviderChamfer::onDelete(const std::vector<std::string> &)
|
||||
{
|
||||
// get the support and Sketch
|
||||
PartDesign::Chamfer* pcChamfer = static_cast<PartDesign::Chamfer*>(getObject());
|
||||
App::DocumentObject *pcSupport;
|
||||
App::DocumentObject *pcSupport = 0;
|
||||
if (pcChamfer->Base.getValue()){
|
||||
pcSupport = static_cast<Sketcher::SketchObject*>(pcChamfer->Base.getValue());
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ bool ViewProviderFillet::onDelete(const std::vector<std::string> &)
|
||||
{
|
||||
// get the support and Sketch
|
||||
PartDesign::Fillet* pcFillet = static_cast<PartDesign::Fillet*>(getObject());
|
||||
App::DocumentObject *pcSupport;
|
||||
App::DocumentObject *pcSupport = 0;
|
||||
if (pcFillet->Base.getValue()){
|
||||
pcSupport = static_cast<Sketcher::SketchObject*>(pcFillet->Base.getValue());
|
||||
}
|
||||
|
||||
@@ -122,8 +122,8 @@ bool ViewProviderGroove::onDelete(const std::vector<std::string> &)
|
||||
{
|
||||
// get the support and Sketch
|
||||
PartDesign::Groove* pcGroove = static_cast<PartDesign::Groove*>(getObject());
|
||||
Sketcher::SketchObject *pcSketch;
|
||||
App::DocumentObject *pcSupport;
|
||||
Sketcher::SketchObject *pcSketch = 0;
|
||||
App::DocumentObject *pcSupport = 0;
|
||||
if (pcGroove->Sketch.getValue()){
|
||||
pcSketch = static_cast<Sketcher::SketchObject*>(pcGroove->Sketch.getValue());
|
||||
pcSupport = pcSketch->Support.getValue();
|
||||
|
||||
@@ -121,8 +121,8 @@ bool ViewProviderPad::onDelete(const std::vector<std::string> &)
|
||||
{
|
||||
// get the support and Sketch
|
||||
PartDesign::Pad* pcPad = static_cast<PartDesign::Pad*>(getObject());
|
||||
Sketcher::SketchObject *pcSketch;
|
||||
App::DocumentObject *pcSupport;
|
||||
Sketcher::SketchObject *pcSketch = 0;
|
||||
App::DocumentObject *pcSupport = 0;
|
||||
if (pcPad->Sketch.getValue()){
|
||||
pcSketch = static_cast<Sketcher::SketchObject*>(pcPad->Sketch.getValue());
|
||||
pcSupport = pcSketch->Support.getValue();
|
||||
|
||||
@@ -122,8 +122,8 @@ bool ViewProviderRevolution::onDelete(const std::vector<std::string> &)
|
||||
{
|
||||
// get the support and Sketch
|
||||
PartDesign::Revolution* pcRevolution = static_cast<PartDesign::Revolution*>(getObject());
|
||||
Sketcher::SketchObject *pcSketch;
|
||||
App::DocumentObject *pcSupport;
|
||||
Sketcher::SketchObject *pcSketch = 0;
|
||||
App::DocumentObject *pcSupport = 0;
|
||||
if (pcRevolution->Sketch.getValue()){
|
||||
pcSketch = static_cast<Sketcher::SketchObject*>(pcRevolution->Sketch.getValue());
|
||||
pcSupport = pcSketch->Support.getValue();
|
||||
|
||||
Reference in New Issue
Block a user