summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/bluetooth/btchat/chat.cpp1
-rw-r--r--examples/bluetooth/btchat/chat.h2
2 files changed, 1 insertions, 2 deletions
diff --git a/examples/bluetooth/btchat/chat.cpp b/examples/bluetooth/btchat/chat.cpp
index cdaa28d8..a9545cf6 100644
--- a/examples/bluetooth/btchat/chat.cpp
+++ b/examples/bluetooth/btchat/chat.cpp
@@ -74,7 +74,6 @@ Chat::Chat(QWidget *parent)
Chat::~Chat()
{
qDeleteAll(clients);
- delete server;
delete ui;
}
diff --git a/examples/bluetooth/btchat/chat.h b/examples/bluetooth/btchat/chat.h
index a9e99395..1c9d3211 100644
--- a/examples/bluetooth/btchat/chat.h
+++ b/examples/bluetooth/btchat/chat.h
@@ -45,7 +45,7 @@ private:
int currentAdapterIndex = 0;
Ui::Chat *ui;
- ChatServer *server;
+ ChatServer *server = nullptr;
QList<ChatClient *> clients;
QList<QBluetoothHostInfo> localAdapters;