aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/motion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/fullpipe/motion.cpp')
-rw-r--r--engines/fullpipe/motion.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index c1977c0ac3..f67011a50f 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -765,7 +765,7 @@ MessageQueue *MovGraph2::buildMovInfo1MessageQueue(MovInfo1 *movInfo) {
MessageQueue *mq2 = genMovement(&movinfo);
- if (mq2) {
+ if (!mq2) {
delete mq;
return 0;
}
@@ -979,6 +979,8 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int
if (minPath < 0.0 || ((linkInfoSource.node != linkInfoDest.node || !linkInfoSource.node) && !tempLinkList.size()))
return 0;
+ memset(&movInfo1, 0, sizeof(movInfo1));
+
movInfo1.subIndex = idxsub;
movInfo1.pt1.x = obj->_ox;
movInfo1.pt1.y = obj->_oy;