#197 closed defect (fixed)
PreparedGeometryFactory crashes if called with null pointer
Reported by: | mloskot | Owned by: | mloskot |
---|---|---|---|
Priority: | critical | Milestone: | 3.1.0 |
Component: | Core | Version: | main |
Severity: | Significant | Keywords: | prepared geometry |
Cc: |
Description
Current version of PreparedGeometryFactory crashes (both create() and prepare() calls) if called with null pointer to Geometry type.
Geometry* p = PreparedGeometryFactory::prepare(0); // segmentation fault here
It should throw an exception or return null pointer, instead of crashing.
Attachments (1)
Change History (4)
by , 16 years ago
comment:1 by , 16 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Thanks for the patch!
Fixed in trunk (r2187)
comment:3 by , 15 years ago
Milestone: | → 3.1.0 |
---|
Note:
See TracTickets
for help on using tickets.
This fix will check for a null geometry and throw an exception if it is. Test cases were updated as well.