diff options
| author | Stanislaw Skowronek <skylark@disorder.sko> | 2013-11-13 15:01:23 (GMT) |
|---|---|---|
| committer | Stanislaw Skowronek <skylark@disorder.sko> | 2013-11-13 15:01:23 (GMT) |
| commit | 5f8ef63e898c023533a34cd8b523e97e22f82c21 (patch) | |
| tree | 48b8b62184d4bd44324cd8ee4698a4331c15470a /src/simulation | |
| parent | 54769d13eb1b4216b7c6d18e08c3797bf3a48e8a (diff) | |
| download | powder-5f8ef63e898c023533a34cd8b523e97e22f82c21.zip powder-5f8ef63e898c023533a34cd8b523e97e22f82c21.tar.gz | |
Fixed bug in ToolStart/Click.
Diffstat (limited to 'src/simulation')
| -rw-r--r-- | src/simulation/Simulation.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index cb59b15..b311465 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -935,7 +935,7 @@ void Simulation::ApplyDecorationBox(int x1, int y1, int x2, int y2, int colR, in int Simulation::ToolClick(int x, int y, int tool) { - if(tools[tool]) + if(tool >= 0 && tool < tools.size() && tools[tool]) { Particle * cpart = NULL; int r; @@ -950,7 +950,7 @@ int Simulation::ToolClick(int x, int y, int tool) int Simulation::ToolStart(int x, int y, int tool) { - if(tools[tool]) + if(tool >= 0 && tool < tools.size() && tools[tool]) { Particle * cpart = NULL; int r; @@ -965,7 +965,7 @@ int Simulation::ToolStart(int x, int y, int tool) int Simulation::Tool(int x, int y, int tool, float strength) { - if(tools[tool]) + if(tool >= 0 && tool < tools.size() && tools[tool]) { Particle * cpart = NULL; int r; |
