git.ucc.asn.au
/
atyndall
/
cits2231.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6176af
)
(no commit message)
author
Ash Tyndall
<
[email protected]
>
Fri, 21 Oct 2011 12:13:07 +0000
(20:13 +0800)
committer
Ash Tyndall
<
[email protected]
>
Fri, 21 Oct 2011 12:13:07 +0000
(20:13 +0800)
helper.c
patch
|
blob
|
history
diff --git
a/helper.c
b/helper.c
index
f6ecc8c
..
9da3e1d
100644
(file)
--- a/
helper.c
+++ b/
helper.c
@@
-309,6
+309,11
@@
int addSceneObject(int id) {
sceneObjs[nObjects].rotation.parameter = 0;
sceneObjs[nObjects].rotation.vect = (vector*)calloc( 3, sizeof(vector[0]) );
+ if ( sceneObjs[nObjects].scale == NULL || sceneObjs[nObjects].rotation.vect == NULL ) {
+ sprintf(stderr, "Could not allocate memory for Scene Object! Shutting down!\n");
+ exit(EXIT_FAILURE);
+ }
+
nObjects += 1; // New object in scene
return nObjects;
UCC
git Repository :: git.ucc.asn.au