aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/url.c b/lib/url.c
index 9ffca16d1..15bababbf 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2868,15 +2868,17 @@ static bool IsPipeliningPossible(const struct SessionHandle *handle,
int Curl_removeHandleFromPipeline(struct SessionHandle *handle,
struct curl_llist *pipeline)
{
- struct curl_llist_element *curr;
+ if(pipeline) {
+ struct curl_llist_element *curr;
- curr = pipeline->head;
- while(curr) {
- if(curr->ptr == handle) {
- Curl_llist_remove(pipeline, curr, NULL);
- return 1; /* we removed a handle */
+ curr = pipeline->head;
+ while(curr) {
+ if(curr->ptr == handle) {
+ Curl_llist_remove(pipeline, curr, NULL);
+ return 1; /* we removed a handle */
+ }
+ curr = curr->next;
}
- curr = curr->next;
}
return 0;