# HG changeset patch # User spq@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1215774010 0 # Node ID cb87d40e93420b4744c1b5cdebd6346cd48737eb # Parent e5e2fec68834affbd5cbd729854da09d0b3c1d39 fix exceptions and cleanup code diff -r e5e2fec68834 -r cb87d40e9342 engine/core/view/renderers/genericrenderer.cpp --- a/engine/core/view/renderers/genericrenderer.cpp Fri Jul 11 10:42:31 2008 +0000 +++ b/engine/core/view/renderers/genericrenderer.cpp Fri Jul 11 11:00:10 2008 +0000 @@ -89,32 +89,32 @@ Instance* GenericRendererNode::getAttachedInstance() { if(m_instance == NULL) { - throw "asd"; + throw NotSupported("No instance attached."); } return m_instance; } Location* GenericRendererNode::getAttachedLocation() { if(m_instance != NULL or m_location == NULL) { - throw "asd"; + throw NotSupported("No location attached."); } return m_location; } Point GenericRendererNode::getAttachedPoint() { if(m_instance != NULL or m_location != NULL) { - throw "asd"; + throw NotSupported("No point attached."); } return m_point; } Location* GenericRendererNode::getOffsetLocation() { - if(m_instance == NULL) { - throw "asd"; + if(m_instance == NULL or m_location == NULL) { + throw NotSupported("No location as offset used."); } return m_location; } Point GenericRendererNode::getOffsetPoint() { if(m_instance == NULL and m_location == NULL) { - throw "asd"; + throw NotSupported("No point as offset used."); } return m_point; } @@ -265,6 +265,10 @@ m_infos.push_back(info); } void GenericRenderer::removeAll() { + std::vector::const_iterator info_it = m_infos.begin(); + for (;info_it != m_infos.end(); ++info_it) { + delete *info_it; + } m_infos.clear(); }