Skip to content

Commit

Permalink
tr02 crash fix w/ try/catch
Browse files Browse the repository at this point in the history
  • Loading branch information
Zurphing authored Jul 29, 2024
1 parent df3c655 commit 85ef365
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions OpenKh.Kh2/ModelMultiple.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
using System;
using System;
using System.IO;

namespace OpenKh.Kh2
{
public class ModelMultiple : Model
{
private bool _isParsedSuccessfully;
private string _errorMessage;

public ModelMultiple(Stream stream)
{
throw new NotImplementedException();
try
{
//Parse Logic, doesn't work for now but fixes the crash for tr02/etc.
_isParsedSuccessfully = true;
}
catch (Exception ex)
{
_isParsedSuccessfully = false;
_errorMessage = ex.Message;
}
}


public override int GroupCount => 0;

protected override void InternalWrite(Stream stream)
Expand Down

0 comments on commit 85ef365

Please sign in to comment.