Bad bug that had to be corrected

develop
simon 2010-05-06 16:49:27 +02:00
parent 722e2e746e
commit d9433aa878
1 changed files with 13 additions and 0 deletions

@ -37,6 +37,7 @@ distribution.
#include "modules/Maps.h"
#include "modules/Materials.h"
#include "modules/Items.h"
#include "modules/Position.h"
#include "modules/Gui.h"
#include "modules/Creatures.h"
@ -148,6 +149,11 @@ bool API::Detach()
delete d->materials;
d->materials = 0;
}
if(d->items)
{
delete d->items;
d->items = 0;
}
if(d->gui)
{
delete d->gui;
@ -265,6 +271,13 @@ Materials * API::getMaterials()
return d->materials;
}
Items * API::getItems()
{
if(!d->items)
d->items = new Items(d);
return d->items;
}
Translation * API::getTranslation()
{
if(!d->translation)