Check for 0 pointer
This commit is contained in:
parent
6dc94056f1
commit
9223ddbc3c
@ -133,6 +133,8 @@ def loadGadget(str filename, int snapshot_id, bool loadPosition = True, bool loa
|
||||
flags |= NEED_VELOCITY
|
||||
|
||||
data = loadGadgetMulti(filename, snapshot_id, flags)
|
||||
if data == <SimuData*>0:
|
||||
return None
|
||||
|
||||
simu = Simulation()
|
||||
simu.data = data
|
||||
|
Loading…
Reference in New Issue
Block a user