diff --git a/file.c b/file.c
index 93f47be48d41a2028ba419ec00ed3c8b48e4410d..4824d77db228f965d91da2ecd971dea375a485a4 100644
--- a/file.c
+++ b/file.c
@@ -143,6 +143,7 @@ int ast_stopstream(struct ast_channel *tmp)
 	/* Stop a running stream if there is one */
 	if (tmp->stream) {
 		ast_closestream(tmp->stream);
+		tmp->stream = NULL;
 		if (tmp->oldwriteformat && ast_set_write_format(tmp, tmp->oldwriteformat))
 			ast_log(LOG_WARNING, "Unable to restore format back to %d\n", tmp->oldwriteformat);
 	}