From 5b68343361cbd000a2f024b37797ec235abb7207 Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Sun, 4 Jul 2010 19:28:39 -0700 Subject: The majority of the Undo fix. There is still an issue with Rotation which i'll address next; however position undo and scale undo should be working just fine now. Also removed some residual debug logging. --- OpenSim/Framework/UndoStack.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/UndoStack.cs') diff --git a/OpenSim/Framework/UndoStack.cs b/OpenSim/Framework/UndoStack.cs index 3799180..4cd779a 100644 --- a/OpenSim/Framework/UndoStack.cs +++ b/OpenSim/Framework/UndoStack.cs @@ -88,7 +88,14 @@ namespace OpenSim.Framework public T Peek() { - return m_undolist[m_undolist.Count - 1]; + if (m_undolist.Count > 0) + { + return m_undolist[m_undolist.Count - 1]; + } + else + { + return default(T); + } } public void Clear() -- cgit v1.1