From b1147a9a4208e41608f916bfcaed03d22b022ef8 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 9 Jul 2023 22:17:42 +0200 Subject: [PATCH] Let the caller deal with checking for NULL --- r5dev/vpc/rson.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/r5dev/vpc/rson.cpp b/r5dev/vpc/rson.cpp index 0a476b90..7bdcd832 100644 --- a/r5dev/vpc/rson.cpp +++ b/r5dev/vpc/rson.cpp @@ -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; } \ No newline at end of file