From af89d99ad56c1ce82581d9182506ca20b2136905 Mon Sep 17 00:00:00 2001
From: capossele <angelocapossele@gmail.com>
Date: Thu, 23 Apr 2020 15:15:32 +0100
Subject: [PATCH] :bug: fix SIGSEGV when drng plugin is disabled

---
 plugins/dashboard/drng_livefeed.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/plugins/dashboard/drng_livefeed.go b/plugins/dashboard/drng_livefeed.go
index bd65799d..d1ac2bce 100644
--- a/plugins/dashboard/drng_livefeed.go
+++ b/plugins/dashboard/drng_livefeed.go
@@ -42,6 +42,9 @@ func runDrngLiveFeed() {
 	})
 
 	daemon.BackgroundWorker("Dashboard[DRNGUpdater]", func(shutdownSignal <-chan struct{}) {
+		if drng.Instance == nil {
+			return
+		}
 		drng.Instance.Events.Randomness.Attach(notifyNewRandomness)
 		drngLiveFeedWorkerPool.Start()
 		<-shutdownSignal
-- 
GitLab