Skip to content

Commit

Permalink
[GUI] Fix memory leak in ViewProviderPlane.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
xtemp09 authored and wwmayer committed Oct 9, 2023
1 parent 13dce78 commit a710eb2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Gui/ViewProviderPlane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ void ViewProviderPlane::attach ( App::DocumentObject *obj ) {

auto material = new SoMaterial();
material->transparency.setValue(0.95f);
auto color = new SbColor();
SbColor color;
float alpha = 0.0f;
color->setPackedValue(ViewProviderOrigin::defaultColor, alpha);
material->ambientColor.setValue(*color);
material->diffuseColor.setValue(*color);
color.setPackedValue(ViewProviderOrigin::defaultColor, alpha);
material->ambientColor.setValue(color);
material->diffuseColor.setValue(color);
faceSeparator->addChild(material);

// disable backface culling and render with two-sided lighting
Expand Down

0 comments on commit a710eb2

Please sign in to comment.