summaryrefslogtreecommitdiffstats
path: root/src/math/Matrix.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/Matrix.h')
-rw-r--r--src/math/Matrix.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/math/Matrix.h b/src/math/Matrix.h
index 5ec79aba..d8920a65 100644
--- a/src/math/Matrix.h
+++ b/src/math/Matrix.h
@@ -30,7 +30,11 @@ public:
RwMatrixDestroy(m_attachment);
}
void Attach(RwMatrix *matrix, bool owner = false){
+#ifdef FIX_BUGS
+ if(m_attachment && m_hasRwMatrix)
+#else
if(m_hasRwMatrix && m_attachment)
+#endif
RwMatrixDestroy(m_attachment);
m_attachment = matrix;
m_hasRwMatrix = owner;