logo

badwolf

minimalist and privacy-oriented web browser based on WebKitGTK git clone https://hacktivis.me/git/badwolf.git
commit: 5145eae758d3817c7bcc1a589514624bb62819e1
parent 231a7c45fac1d1811650ba9ae714de6975fc1da8
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 10 Apr 2021 17:39:05 +0200

assert webkit_download before using it

Diffstat:

Mbadwolf.c3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -10,6 +10,7 @@ #include "keybindings.h" #include "uri.h" +#include <assert.h> #include <glib/gi18n.h> /* _() and other internationalization/localization helpers */ #include <libsoup/soup.h> /* soup* */ #include <locale.h> /* 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;