Added raise RuntimeError blocks for all pyobjects in geo

This commit is contained in:
_ 2018-05-17 11:08:58 -07:00
parent f4e5dfa269
commit 4b574f9456

View File

@ -145,7 +145,8 @@ class pyGeoHeader:
self.cstruct = ctypes.pointer(Header())
ptrofptr = ctypes.byref(self.cstruct)
if filedata:
devil1geo.getheader(ptrofptr, filedata)
if not devil1geo.getheader(ptrofptr, filedata):
raise RuntimeError("failed to get geometry file header")
return
def show(self):
@ -175,7 +176,8 @@ class pyMeshHeader:
self.cstruct = ctypes.pointer(MeshHeader())
ptrofptr = ctypes.byref(self.cstruct)
if filedata:
devil1geo.getmeshheader(ptrofptr, i, filedata)
if not devil1geo.getmeshheader(ptrofptr, i, filedata):
raise RuntimeError("failed to get mesh header #" + str(i))
return
pass