diff --git a/char_layout_node.h b/char_layout_node.h index 71efb07b1..44b8c1e62 100644 --- a/char_layout_node.h +++ b/char_layout_node.h @@ -50,7 +50,9 @@ private: class CharLayoutRef : public LayoutReference { public: CharLayoutRef(char c) : LayoutReference() { - this->castedNode()->setChar(c); //TODO use init + if (!(this->node()->isAllocationFailure())) { + this->castedNode()->setChar(c); + } } }; diff --git a/float_node.h b/float_node.h index 87f648ffc..da9cf2851 100644 --- a/float_node.h +++ b/float_node.h @@ -18,7 +18,6 @@ public: return m_value > 1 ? "BigFloat" : "SmallFloat"; } void setFloat(float f) { m_value = f; } - void init(float f) override { m_value = f; } private: float m_value; }; @@ -26,7 +25,9 @@ private: class FloatRef : public ExpressionReference { public: FloatRef(float f) : ExpressionReference() { - this->node()->init(f); + if (!(this->node()->isAllocationFailure())) { + this->castedNode()->setFloat(f); + } } }; diff --git a/tree_node.h b/tree_node.h index cdcf854fd..1cc3b26ba 100644 --- a/tree_node.h +++ b/tree_node.h @@ -37,7 +37,6 @@ public: } // Node operations - virtual void init(float f) {} void retain() { m_referenceCounter++; } void release(); void releaseChildren();