From ac40889c5466314dd22def238449352a2a4cc67e Mon Sep 17 00:00:00 2001
From: Tobias Markmann <tm@ayena.de>
Date: Tue, 4 Apr 2017 10:40:40 +0200
Subject: Add missing check for initialised pointer

Coverity raised this issue.

Test-Information:

All unit and integration tests, including the file-transfer
tests, passed on macOS 10.12.4.

Change-Id: I418358366478ad76e4eff4fb0a3559373931e111

diff --git a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp
index 09b664f..834a401 100644
--- a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp
+++ b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.cpp
@@ -168,7 +168,7 @@ void LocalJingleTransportCandidateGenerator::emitOnLocalTransportCandidatesGener
         }
     }
 
-    if (options_.isProxiedAllowed() && s5bProxy->getOrDiscoverS5BProxies().is_initialized()) {
+    if (options_.isProxiedAllowed() && s5bProxy && s5bProxy->getOrDiscoverS5BProxies().is_initialized()) {
         for (auto&& proxy : s5bProxy->getOrDiscoverS5BProxies().get()) {
             if (proxy->getStreamHost()) { // FIXME: Added this test, because there were cases where this wasn't initialized. Investigate this. (Remko)
                 JingleS5BTransportPayload::Candidate candidate;
-- 
cgit v0.10.2-6-g49f6