diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-25 18:42:53 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-25 18:42:53 (GMT) |
| commit | a033fe7e496cfb5c6f4ec78e607408418858e765 (patch) | |
| tree | a94e07b4cad1b0e81809682c5b48eee88c075e7e /src/simulation/elements/NEUT.cpp | |
| parent | a5d6c56f8cb5eab1d0c9823142c61de97230ee94 (diff) | |
| download | powder-a033fe7e496cfb5c6f4ec78e607408418858e765.zip powder-a033fe7e496cfb5c6f4ec78e607408418858e765.tar.gz | |
TPT: Add ptypes.enabled checks to a few more places 61f39f5464
Diffstat (limited to 'src/simulation/elements/NEUT.cpp')
| -rw-r--r-- | src/simulation/elements/NEUT.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/simulation/elements/NEUT.cpp b/src/simulation/elements/NEUT.cpp index 0d882d8..4641370 100644 --- a/src/simulation/elements/NEUT.cpp +++ b/src/simulation/elements/NEUT.cpp @@ -172,7 +172,7 @@ int Element_NEUT::create_n_parts(Simulation * sim, int n, int x, int y, float vx if (n>340) { n = 340; } - if (x<0 || y<0 || x>=XRES || y>=YRES || t<0 || t>=PT_NUM) + if (x<0 || y<0 || x>=XRES || y>=YRES || t<0 || t>=PT_NUM || !sim->elements[t].Enabled) return -1; for (c=0; c<n; c++) { |
