call gluDeleteQuadric only if sphare is initialised

This commit is contained in:
stojce 2013-03-06 08:16:40 +01:00
parent 3b3ab9f68f
commit 2a4a7b4ab8

View file

@ -80,8 +80,9 @@ Head::Head()
}
Head::~Head() {
// all data is primitive, do nothing
gluDeleteQuadric(sphere);
if (sphere) {
gluDeleteQuadric(sphere);
}
}
Head* Head::clone() const {