[Scummvm-git-logs] scummvm master -> fca45d1c7cd8db3484c26084f07e53cc537209c4
aquadran
noreply at scummvm.org
Sun Oct 13 19:34:24 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
fca45d1c7c WINTERMUTE: Handle case with null pointer vector for DXVec3Transform
Commit: fca45d1c7cd8db3484c26084f07e53cc537209c4
https://github.com/scummvm/scummvm/commit/fca45d1c7cd8db3484c26084f07e53cc537209c4
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2024-10-13T21:34:19+02:00
Commit Message:
WINTERMUTE: Handle case with null pointer vector for DXVec3Transform
Changed paths:
engines/wintermute/base/gfx/xmath.cpp
diff --git a/engines/wintermute/base/gfx/xmath.cpp b/engines/wintermute/base/gfx/xmath.cpp
index 91907032c57..b9431fd98c1 100644
--- a/engines/wintermute/base/gfx/xmath.cpp
+++ b/engines/wintermute/base/gfx/xmath.cpp
@@ -485,6 +485,11 @@ float DXQuaternionDot(const DXVector4 *pq1, const DXVector4 *pq2) {
DXVector4 *DXVec3Transform(DXVector4 *pout, const DXVector3 *pv, const DXMatrix *pm) {
DXVector4 out;
+ DXVector3 vz(0, 0, 0);
+
+ if (!pv) {
+ pv = &vz;
+ }
out._x = pm->_m[0][0] * pv->_x + pm->_m[1][0] * pv->_y + pm->_m[2][0] * pv->_z + pm->_m[3][0];
out._y = pm->_m[0][1] * pv->_x + pm->_m[1][1] * pv->_y + pm->_m[2][1] * pv->_z + pm->_m[3][1];
More information about the Scummvm-git-logs
mailing list