FreeCAD: master 110860fa

Author Committer Branch Timestamp Parent
luz paz wwmayer master 2021-02-21 04:02:24 master 9fb381b7
Affected Issues  0004421: Part.CompoundTools.Explode.explodeCompound access a property of a sometimes null object with an error
Changeset Part: Part.CompoundTools.Explode.explodeCompound access a property of...

...a sometimes null object with an error

Python code, file `src/Mod/Part/CompoundTools/Explode.py`
The `explodeCompound` function can be called in a context without assigning the `ViewObject` property, for example from a command line script.

The error that is fixed by this patch.
```
Traceback (most recent call last):
  ...
  File "/opt/freecad/Mod/Part/CompoundTools/Explode.py", line 23, in explodeCompound
    cf.ViewObject.DontUnhideOnDelete = True
AttributeError: 'NoneType' object has no attribute 'DontUnhideOnDelete']
```

Patch submitted by marioamb.
Fix 0004421
https://tracker.freecadweb.org/view.php?id=4421
mod - src/Mod/Part/CompoundTools/Explode.py Diff File