Check for 0 pointer

This commit is contained in:
Guilhem Lavaux 2014-05-27 13:54:42 +02:00
parent 6dc94056f1
commit 9223ddbc3c

View File

@ -133,6 +133,8 @@ def loadGadget(str filename, int snapshot_id, bool loadPosition = True, bool loa
flags |= NEED_VELOCITY flags |= NEED_VELOCITY
data = loadGadgetMulti(filename, snapshot_id, flags) data = loadGadgetMulti(filename, snapshot_id, flags)
if data == <SimuData*>0:
return None
simu = Simulation() simu = Simulation()
simu.data = data simu.data = data