diff options
Diffstat (limited to 'libdimension/sphere.c')
-rw-r--r-- | libdimension/sphere.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libdimension/sphere.c b/libdimension/sphere.c index 4b99eaf..a14070e 100644 --- a/libdimension/sphere.c +++ b/libdimension/sphere.c @@ -29,8 +29,10 @@ dmnsn_object * dmnsn_new_sphere() { dmnsn_object *sphere = dmnsn_new_object(); - sphere->intersections_fn = &dmnsn_sphere_intersections_fn; - sphere->inside_fn = &dmnsn_sphere_inside_fn; + if (sphere) { + sphere->intersections_fn = &dmnsn_sphere_intersections_fn; + sphere->inside_fn = &dmnsn_sphere_inside_fn; + } return sphere; } |