mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-06-02 21:45:13 -05:00
catch possible edge case during fork/repoint
This commit is contained in:
parent
6288f20be0
commit
4b922639a8
|
|
@ -1776,6 +1776,10 @@ namespace HavenSoft.HexManiac.Core.ViewModels {
|
|||
/// Leave the original data (and other pointers to it) untouched.
|
||||
/// </summary>
|
||||
private void RepointWithoutRun(int source, int destination) {
|
||||
if (!destination.InRange(0, Model.Count)) {
|
||||
RaiseError("Could not find suitable freespace to use for the repoint.");
|
||||
return;
|
||||
}
|
||||
if (!(Model.GetNextRun(source) is ITableRun table)) {
|
||||
RaiseError("Could not parse a data format for that pointer.");
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user