Code Cleanup: RideFileCommand

.. fix small memory leak on command stack.
This commit is contained in:
Mark Liversedge
2013-02-11 14:36:05 +00:00
parent b8f23a14a4
commit 0f4d00dbda

View File

@@ -150,8 +150,9 @@ RideFileCommand::doCommand(RideCommand *cmd, bool noexec)
// place onto stack
if (stack.count()) {
// wipe away commands we can no longer redo
for (int i=stackptr; i<stack.count(); i++) delete stack.at(i);
stack.remove(stackptr, stack.count() - stackptr);
// XXX mem leak need to delete
}
stack.append(cmd);
stackptr++;