Browse Source

Remove IsNull() checks from JSON save. Closes #1265.

Lasse Öörni 9 years ago
parent
commit
1afdd26927
2 changed files with 0 additions and 12 deletions
  1. 0 6
      Source/Urho3D/Scene/Serializable.cpp
  2. 0 6
      Source/Urho3D/Scene/UnknownComponent.cpp

+ 0 - 6
Source/Urho3D/Scene/Serializable.cpp

@@ -548,12 +548,6 @@ bool Serializable::SaveXML(XMLElement& dest) const
 
 bool Serializable::SaveJSON(JSONValue& dest) const
 {
-    if (dest.IsNull())
-    {
-        URHO3D_LOGERROR("Could not save " + GetTypeName() + ", null destination JSON value");
-        return false;
-    }
-
     const Vector<AttributeInfo>* attributes = GetAttributes();
     if (!attributes)
         return true;

+ 0 - 6
Source/Urho3D/Scene/UnknownComponent.cpp

@@ -218,12 +218,6 @@ bool UnknownComponent::SaveXML(XMLElement& dest) const
 
 bool UnknownComponent::SaveJSON(JSONValue& dest) const
 {
-    if (dest.IsNull())
-    {
-        URHO3D_LOGERROR("Could not save " + GetTypeName() + ", null destination element");
-        return false;
-    }
-
     if (!useXML_)
         URHO3D_LOGWARNING("UnknownComponent loaded in binary mode, attributes will be empty for JSON save");