Py3: fix crash if class is not part of a module any more
Py3: fix crash if class is not part of a module any more

Fat-Zer/FreeCAD_sf_master,Fat-Zer/FreeCAD_sf_master,Fat-Zer/FreeCAD_sf_master,Fat-Zer/FreeCAD_sf_master,Fat-Zer/FreeCAD_sf_master