Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#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)

diff.197 (2.4 KB ) - added by cthibert 16 years ago.
This fix will check for a null geometry and throw an exception if it is. Test cases were updated as well.

Download all attachments as: .zip

Change History (4)

by cthibert, 16 years ago

Attachment: diff.197 added

This fix will check for a null geometry and throw an exception if it is. Test cases were updated as well.

comment:1 by mloskot, 16 years ago

Owner: set to mloskot
Status: newassigned

comment:2 by mloskot, 16 years ago

Resolution: fixed
Status: assignedclosed

Thanks for the patch!

Fixed in trunk (r2187)

comment:3 by pramsey, 15 years ago

Milestone: 3.1.0
Note: See TracTickets for help on using tickets.