From: Daniel Carl <danielcarl@gmx.de>
Date: Thu, 11 May 2017 12:50:01 +0000 (+0200)
Subject: Fixed possible null pointer dereference #392.
X-Git-Url: https://git.owens.tech/wrapped.html/wrapped.html/git?a=commitdiff_plain;h=00a4a1283a4fc675f49caf2020b852b79abcf4ee;p=vimb.git

Fixed possible null pointer dereference #392.
---

diff --git a/src/ex.c b/src/ex.c
index fde1bb7..3660ec7 100644
--- a/src/ex.c
+++ b/src/ex.c
@@ -1324,6 +1324,10 @@ static gboolean history(Client *c, gboolean prev)
         exhist.active = new;
     }
 
+    if (!exhist.active) {
+        goto failed;
+    }
+
     vb_echo_force(c, MSG_NORMAL, FALSE, "%s%s", exhist.prefix, (char*)exhist.active->data);
 
     g_free(input);