From 6563977f8160b8f342af69bd978af180329bff94 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 31 Jan 2017 00:42:50 +0300 Subject: Fix null pointer in unit tests. --- src/gui/windows/buydialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gui/windows') diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp index ebf4ef8a4..df478891c 100644 --- a/src/gui/windows/buydialog.cpp +++ b/src/gui/windows/buydialog.cpp @@ -409,7 +409,8 @@ BuyDialog::~BuyDialog() { delete2(mShopItems); instances.remove(this); - buySellHandler->cleanDialogReference(this); + if (buySellHandler) + buySellHandler->cleanDialogReference(this); } void BuyDialog::setMoney(const int amount) -- cgit v1.2.3-70-g09d2