From 5145eae758d3817c7bcc1a589514624bb62819e1 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 10 Apr 2021 17:39:05 +0200 Subject: assert webkit_download before using it --- badwolf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/badwolf.c b/badwolf.c index 84f4104..af2fe78 100644 --- a/badwolf.c +++ b/badwolf.c @@ -10,6 +10,7 @@ #include "keybindings.h" #include "uri.h" +#include #include /* _() and other internationalization/localization helpers */ #include /* soup* */ #include /* LC_* */ @@ -466,6 +467,8 @@ web_contextCb_download_started(WebKitWebContext *web_context, struct Client *browser = (struct Client *)user_data; struct Download *download = malloc(sizeof(struct Download)); + assert(webkit_download); + if(download != NULL) { download->window = browser->window; -- cgit v1.3.1-23-gd82d