Commit 94db56eb authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Error checking on creating UnitCell pointer

parent 247e7017
......@@ -144,6 +144,8 @@ cdef class UnitCell:
cdef crystfel.UnitCell* ptr = crystfel.cell_new_from_parameters(
a, b, c, alpha, beta, gamma,
if ptr is NULL:
raise MemoryError("Could not create UnitCell struct")
return UnitCell.from_ptr(ptr, owner=True)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment