Tastudio - add some paranoia checks when drawing markers and branches. This happened one time while debugging and I couldn't reproduce, but it is possible the controls might need be told to redraw while still rebooting the core, in which case there is no TasMovie to read from yet, so check for null
This commit is contained in:
parent
946ff45608
commit
5515e9fea7
|
@ -95,6 +95,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
text = "";
|
||||
|
||||
// This could happen if the control is told to redraw while Tastudio is rebooting, as we would not have a TasMovie just yet
|
||||
if (Tastudio.CurrentTasMovie == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (index >= Branches.Count)
|
||||
{
|
||||
return;
|
||||
|
@ -111,6 +117,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void QueryItemBkColor(int index, RollColumn column, ref Color color)
|
||||
{
|
||||
// This could happen if the control is told to redraw while Tastudio is rebooting, as we would not have a TasMovie just yet
|
||||
if (Tastudio.CurrentTasMovie == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var branch = Branches[index];
|
||||
if (branch != null)
|
||||
{
|
||||
|
|
|
@ -58,6 +58,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void MarkerView_QueryItemBkColor(int index, RollColumn column, ref Color color)
|
||||
{
|
||||
// This could happen if the control is told to redraw while Tastudio is rebooting, as we would not have a TasMovie just yet
|
||||
if (Tastudio.CurrentTasMovie == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var prev = Markers.PreviousOrCurrent(Tastudio.Emulator.Frame);
|
||||
|
||||
if (prev != null && index == Markers.IndexOf(prev))
|
||||
|
@ -88,6 +94,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
text = "";
|
||||
|
||||
// This could happen if the control is told to redraw while Tastudio is rebooting, as we would not have a TasMovie just yet
|
||||
if (Tastudio.CurrentTasMovie == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (column.Name == "FrameColumn")
|
||||
{
|
||||
text = Markers[index].Frame.ToString();
|
||||
|
|
Loading…
Reference in New Issue