[Horus] Malloc check added

This commit is contained in:
Bertrand Songis
2017-01-22 22:01:39 +01:00
parent cdb3f48da7
commit d60de4466a
7 changed files with 50 additions and 23 deletions
+6 -2
View File
@@ -98,14 +98,18 @@ class BaseLayoutFactory: public LayoutFactory
virtual Layout * create(Layout::PersistentData * persistentData) const
{
Layout * layout = new T(this, persistentData);
layout->create();
if (layout) {
layout->create();
}
return layout;
}
virtual Layout * load(Layout::PersistentData * persistentData) const
{
Layout * layout = new T(this, persistentData);
layout->load();
if (layout) {
layout->load();
}
return layout;
}