diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-10-13 16:20:32 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-10-13 11:31:25 -0700 |
commit | a2a93ff04b26b9b3da96d780c3540451493f0858 (patch) | |
tree | 8a14300f71dcd0c4c29833631862e9ecdd734542 /qt-gui.cpp | |
parent | d23266ad5119264b0e8c8de0d9edd76c491e0d84 (diff) | |
download | subsurface-a2a93ff04b26b9b3da96d780c3540451493f0858.tar.gz |
Models: fix two potential crashes
CylinderModels::setDive() and WeightModel::setDive() have
potential to pass the 'last' argument to beginInsertRows() as
a negative number which triggers an assert that 'last' cannot
be smaller than 'first'.
Patch attempts to fix that by only calling beginInsertRows()
when there is at least one row to insert.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-gui.cpp')
0 files changed, 0 insertions, 0 deletions