Add some safety to object path requests
This commit is contained in:
parent
9fd76815a2
commit
de4f3d6381
|
@ -136,6 +136,7 @@ public class ResourcePathManager
|
||||||
{
|
{
|
||||||
if (!_initialised) return null;
|
if (!_initialised) return null;
|
||||||
|
|
||||||
|
objectName = objectName.ToLower();
|
||||||
if (_omResources.objectPathMap.TryGetValue(objectName, out var path))
|
if (_omResources.objectPathMap.TryGetValue(objectName, out var path))
|
||||||
{
|
{
|
||||||
return path;
|
return path;
|
||||||
|
@ -147,6 +148,7 @@ public class ResourcePathManager
|
||||||
{
|
{
|
||||||
if (!_initialised) return null;
|
if (!_initialised) return null;
|
||||||
|
|
||||||
|
objectName = objectName.ToLower();
|
||||||
if (_fmResources.TryGetValue(campaignName, out var campaign) &&
|
if (_fmResources.TryGetValue(campaignName, out var campaign) &&
|
||||||
campaign.objectPathMap.TryGetValue(objectName, out var path))
|
campaign.objectPathMap.TryGetValue(objectName, out var path))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue