Imported Upstream version 4.0.5+dfsg1
[abartlet/samba-debian.git] / source3 / rpc_client / cli_pipe.c
index 61e6cce69618810a18715f8f70a563af35eabca0..24d69ff41ad04cab4a59b737c1f9e07e9d866d92 100644 (file)
@@ -1805,7 +1805,7 @@ static void rpc_pipe_bind_step_two_done(struct tevent_req *subreq)
        status = dcerpc_netr_LogonGetCapabilities_r_recv(subreq, talloc_tos());
        TALLOC_FREE(subreq);
        if (NT_STATUS_EQUAL(status, NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE)) {
-               if (state->cli->dc->negotiate_flags &
+               if (state->cli->dc && state->cli->dc->negotiate_flags &
                    NETLOGON_NEG_SUPPORTS_AES) {
                        DEBUG(5, ("AES is not supported and the error was %s\n",
                                  nt_errstr(status)));