- fixed: LDMatrixObject's position would be an invalid pointer if it was created with the default constructor, causing a crash

Fri, 13 Dec 2013 00:31:16 +0200

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Fri, 13 Dec 2013 00:31:16 +0200
changeset 555
5bf1f8dd901d
parent 554
2478a6b3106d
child 556
5f4395ec5db0

- fixed: LDMatrixObject's position would be an invalid pointer if it was created with the default constructor, causing a crash

src/ldtypes.h file | annotate | diff | comparison | revisions
--- a/src/ldtypes.h	Fri Dec 13 00:28:24 2013 +0200
+++ b/src/ldtypes.h	Fri Dec 13 00:31:16 2013 +0200
@@ -184,7 +184,9 @@
 	PROPERTY (public,	matrix,				Transform,		NO_OPS,	CUSTOM_WRITE)
 
 	public:
-		LDMatrixObject() {}
+		LDMatrixObject() :
+			m_Position (LDSharedVertex::getSharedVertex ({0, 0, 0})) {}
+
 		LDMatrixObject (const matrix& transform, const vertex& pos) :
 			m_Transform (transform),
 			m_Position (LDSharedVertex::getSharedVertex (pos)) {}

mercurial