mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Let the caller deal with checking for NULL
This commit is contained in:
parent
d5f74dc245
commit
b1147a9a42
@ -25,16 +25,5 @@ RSON::Node_t* RSON::LoadFromFile(const char* pszFilePath, const char* pPathID)
|
||||
fileBuf[nRead] = '\0';
|
||||
|
||||
RSON::Node_t* node = RSON::LoadFromBuffer(pszFilePath, fileBuf.get(), eFieldType::RSON_OBJECT);
|
||||
|
||||
if (node)
|
||||
return node;
|
||||
else
|
||||
{
|
||||
// [rexx]: not sure if this should be fatal or not. ideally this should be handled appropriately
|
||||
// in the calling function
|
||||
Error(eDLL_T::ENGINE, NO_ERROR, "Error loading file '%s'\n", pszFilePath);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return node;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user