]> code.citadel.org Git - citadel.git/blobdiff - citadel/event_client.c
make this generaly in the ev interface.
[citadel.git] / citadel / event_client.c
index 833a270a75f316b970133c962dd0ce1116aa5591..5a32cea9bca45878d533fe68cb1cec7f68700147 100644 (file)
@@ -240,8 +240,10 @@ void FreeAsyncIOContents(AsyncIO *IO)
        FreeURL(&IO->ConnectMe);
        FreeStrBuf(&IO->HttpReq.ReplyData);
 
-       Ctx->state = CON_IDLE;
-       Ctx->kill_me = 1;
+       if (Ctx) {
+               Ctx->state = CON_IDLE;
+               Ctx->kill_me = 1;
+       }
 }
 
 
@@ -279,7 +281,6 @@ void ShutDownCLient(AsyncIO *IO)
        IO->Terminate(IO);
 }
 
-
 eReadState HandleInbound(AsyncIO *IO)
 {
        const char *Err = NULL;