mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-22 03:40:54 +00:00
add error checks to GetPlayersWithCameras
This commit is contained in:
parent
bba830c144
commit
f5cad9f0cd
@ -113,6 +113,16 @@ namespace QSB.Player
|
|||||||
{
|
{
|
||||||
cameraList.Add(LocalPlayer);
|
cameraList.Add(LocalPlayer);
|
||||||
}
|
}
|
||||||
|
else if (includeLocalCamera && (LocalPlayer == default || LocalPlayer.Camera == null))
|
||||||
|
{
|
||||||
|
if (LocalPlayer == default)
|
||||||
|
{
|
||||||
|
DebugLog.ToConsole($"Error - LocalPlayer is null.", MessageType.Error);
|
||||||
|
return cameraList;
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugLog.DebugWrite($"Error - LocalPlayer.Camera is null.", MessageType.Error);
|
||||||
|
}
|
||||||
|
|
||||||
return cameraList;
|
return cameraList;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user