From 4f4d6efe3b4eb623347ef248d11b1db562a35a1d Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Sun, 16 Dec 2018 18:16:46 -0800 Subject: [PATCH] #79 - Prevent crash if zcash.conf is not found, --- src/mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d430155..29533d0 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -394,7 +394,10 @@ void MainWindow::setupSettingsModal() { settings.chkAutoShield->setChecked(Settings::getInstance()->getAutoShield()); // Use Tor - bool isUsingTor = !rpc->getConnection()->config->proxy.isEmpty(); + bool isUsingTor = false; + if (rpc->getConnection() != nullptr) { + isUsingTor = !rpc->getConnection()->config->proxy.isEmpty(); + } settings.chkTor->setChecked(isUsingTor); if (rpc->getEZcashD() == nullptr) { settings.chkTor->setEnabled(false);