summaryrefslogtreecommitdiff
path: root/sapi/apache/mod_php4.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/apache/mod_php4.c')
-rw-r--r--sapi/apache/mod_php4.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c
index a242123166..86bab41fa2 100644
--- a/sapi/apache/mod_php4.c
+++ b/sapi/apache/mod_php4.c
@@ -149,11 +149,13 @@ static int sapi_apache_ub_write(const char *str, uint str_length)
static void sapi_apache_flush(void *server_context)
{
+ if (server_context) {
#if MODULE_MAGIC_NUMBER > 19970110
- rflush((request_rec *) server_context);
+ rflush((request_rec *) server_context);
#else
- bflush((request_rec *) server_context->connection->client);
+ bflush((request_rec *) server_context->connection->client);
#endif
+ }
}