diff --git a/src/driver.cpp b/src/driver.cpp index 6b70515f1d..96ccd761eb 100644 --- a/src/driver.cpp +++ b/src/driver.cpp @@ -195,7 +195,8 @@ char *DriverFactoryBase::GetDriversInfo(char *p, const char *last) /** Frees memory used for this->name */ -DriverFactoryBase::~DriverFactoryBase() { +DriverFactoryBase::~DriverFactoryBase() +{ if (this->name == NULL) return; /* Prefix the name with driver type to make it unique */