aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/UndoStack.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/UndoStack.cs9
1 files changed, 8 insertions, 1 deletions
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
88 88
89 public T Peek() 89 public T Peek()
90 { 90 {
91 return m_undolist[m_undolist.Count - 1]; 91 if (m_undolist.Count > 0)
92 {
93 return m_undolist[m_undolist.Count - 1];
94 }
95 else
96 {
97 return default(T);
98 }
92 } 99 }
93 100
94 public void Clear() 101 public void Clear()