
[r1216] Crash when undoing for things.
Steps to reproduce:1. Open the attachment. Map format is ZDoom UDMF.
2. Select all the things.
3. Copy and paste them in other place (the same map).
4. Press C to cancel the selection on the pasted ones.
5. Move the player thing from the pasted ones.
6. Undo the first time. The player thing is returned to the pasted position.
7. Undo the second time.
The exception says:Object reference not set to an instance of an object.Sometimes it might fail, so I paste exception text from the detail when crashes.
Quote:
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at CodeImp.DoomBuilder.Map.Thing.DetermineSector()
at CodeImp.DoomBuilder.Controls.ThingInfoPanel.ShowInfo(Thing t)
at CodeImp.DoomBuilder.Windows.MainForm.ShowThingInfo(Thing t)
at CodeImp.DoomBuilder.Windows.MainForm.RefreshInfo()
at CodeImp.DoomBuilder.Editing.UndoManager.PerformUndo(Int32 levels)
at CodeImp.DoomBuilder.Editing.UndoManager.PerformUndo()
at CodeImp.DoomBuilder.Actions.Action.Begin()
at CodeImp.DoomBuilder.Actions.ActionManager.BeginActionByKey(Int32 key, Boolean repeated)
at CodeImp.DoomBuilder.Actions.ActionManager.KeyPressed(Int32 key)
at CodeImp.DoomBuilder.Windows.MainForm.MainForm_KeyDown(Object sender, KeyEventArgs e)
at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at CodeImp.DoomBuilder.Windows.MainForm.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)