Don't dereference null pointers

Potential crash place. This is hard to reproduce, at least I didn't manage, so this might actually lead to a wrong state afterwards. However, backtrace indicated that in sweep.cpp at line 67 null pointer was dereferenced. Root cause like much earlier.

#0  p2t::Triangle::GetConstrainedEdgeCW (this=0x0, p=...) at common/shapes.cpp:271
#1  0x4666ff7c in p2t::Sweep::FinalizationPolygon (this=<optimized out>, tcx=...) at sweep/sweep.cpp:67
#2  0x4667189c in p2t::Sweep::Triangulate (this=0x5064f9f0, tcx=...) at sweep/sweep.cpp:48

@sletta @rburchell