mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
ASYLUM: sanity check for a possible assertion in Polygon::contains
This commit is contained in:
parent
a663c3da75
commit
2608705d6d
@ -33,6 +33,11 @@ bool Polygon::contains(const Common::Point &point) {
|
||||
bool yflag1;
|
||||
bool inside_flag = false;
|
||||
|
||||
// if no points are defined, an intersect check will fail
|
||||
// (count - 1 would trigger an assertion in vtx0)
|
||||
if (points.size() == 0)
|
||||
return false;
|
||||
|
||||
Common::Point *vtx0 = &points[count() - 1];
|
||||
Common::Point *vtx1 = &points[0];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user