summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/libcli/cliconnect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index 03112176d4..ea5f4e8a5d 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -211,7 +211,7 @@ struct cli_state *cli_state_init(void)
****************************************************************************/
void cli_shutdown(struct cli_state *cli)
{
- if (!cli) return;
+ if (!cli || !cli->tree) return;
cli->tree->reference_count++;
cli_tree_close(cli->tree);
if (cli->mem_ctx) {