summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/FGServer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'FaceTrackNoIR/FGServer.cpp')
-rw-r--r--FaceTrackNoIR/FGServer.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/FaceTrackNoIR/FGServer.cpp b/FaceTrackNoIR/FGServer.cpp
index 292c194b..66cc1d5d 100644
--- a/FaceTrackNoIR/FGServer.cpp
+++ b/FaceTrackNoIR/FGServer.cpp
@@ -46,11 +46,15 @@ FGServer::FGServer( Tracker *parent ) {
/** destructor **/
FGServer::~FGServer() {
- inSocket->close();
- outSocket->close();
-
- delete inSocket;
- delete outSocket;
+ if (inSocket != 0) {
+ inSocket->close();
+ delete inSocket;
+ }
+
+ if (outSocket != 0) {
+ outSocket->close();
+ delete outSocket;
+ }
}
//