]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/http.c
WebCit-NG:
[citadel.git] / webcit-ng / http.c
index 47a5bf66b9c2128409bc435f3d194c5ad4aa55a8..8a478f638a495b239791569190daf14a2a21e1f1 100644 (file)
@@ -159,7 +159,7 @@ void perform_one_http_transaction(struct client_handle *ch) {
        }
 
        // If the URL had any query parameters in it, parse them out now.
-       char *p = strchr(h.url, '?');
+       char *p = (h.url ? strchr(h.url, '?') : NULL);
        if (p) {
                *p++ = 0;                                               // insert a null to remove parameters from the URL
                char *tok, *saveptr = NULL;