mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
avoid a possible null ref
This commit is contained in:
@@ -240,9 +240,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if(state != null)
|
||||
{
|
||||
OSDMap s = (OSDMap)state;
|
||||
|
||||
if (s.ContainsKey("ViewerUiIsGod"))
|
||||
newstate = s["ViewerUiIsGod"].AsBoolean();
|
||||
if (s.TryGetValue("ViewerUiIsGod", out OSD tmp))
|
||||
newstate = tmp.AsBoolean();
|
||||
m_lastLevelToViewer = m_viewergodlevel; // we are not changing viewer level by default
|
||||
}
|
||||
UpdateGodLevels(newstate);
|
||||
|
||||
@@ -846,6 +846,8 @@ namespace Amib.Threading
|
||||
continue;
|
||||
|
||||
Thread thread = te.WorkThread;
|
||||
if(thread is null)
|
||||
continue;
|
||||
|
||||
// Join don't work with negative numbers
|
||||
if (!waitInfinitely && (millisecondsLeft < 0))
|
||||
|
||||
Reference in New Issue
Block a user