diff --git a/plugins/feature/map/webserver.cpp b/plugins/feature/map/webserver.cpp
index 3a2eb29240..cb9116cd33 100644
--- a/plugins/feature/map/webserver.cpp
+++ b/plugins/feature/map/webserver.cpp
@@ -15,6 +15,7 @@
// along with this program. If not, see . //
///////////////////////////////////////////////////////////////////////////////////
+#include
#include
#include
#include
@@ -41,6 +42,11 @@ WebServer::WebServer(quint16 &port, QObject* parent) :
m_mimeTypes.insert(".geojson", new MimeType("application/geo+json"));
}
+WebServer::~WebServer()
+{
+ qDeleteAll(m_mimeTypes);
+}
+
void WebServer::incomingConnection(qintptr socket)
{
QTcpSocket* s = new QTcpSocket(this);
diff --git a/plugins/feature/map/webserver.h b/plugins/feature/map/webserver.h
index 7aa5070da0..b24f92ba42 100644
--- a/plugins/feature/map/webserver.h
+++ b/plugins/feature/map/webserver.h
@@ -64,6 +64,7 @@ class WebServer : public QTcpServer
public:
WebServer(quint16 &port, QObject* parent = 0);
+ ~WebServer();
void incomingConnection(qintptr socket) override;
void addPathSubstitution(const QString &from, const QString &to);
void addSubstitution(QString path, QString from, QString to);