diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-06-13 22:55:23 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-06-13 22:55:23 +0000 |
commit | 5e605e80937a02a55e2d2b94bce715ff937e0d26 (patch) | |
tree | d1b7334f94c0ce26127dd3d160c80a53c8ff84fd | |
parent | 9b85799fb274f291d4fefd9de08c069fe11d46f1 (diff) | |
download | dimension-5e605e80937a02a55e2d2b94bce715ff937e0d26.tar.xz |
Fix dmnsn_new_sphere failure symantics.
-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; } |