summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/buysellhandler.h5
-rw-r--r--src/net/ea/buysellhandler.cpp6
-rw-r--r--src/net/ea/buysellhandler.h3
3 files changed, 14 insertions, 0 deletions
diff --git a/src/net/buysellhandler.h b/src/net/buysellhandler.h
index 79cb60b6c..e6f66129c 100644
--- a/src/net/buysellhandler.h
+++ b/src/net/buysellhandler.h
@@ -25,6 +25,8 @@
#include "resources/item/shopitem.h"
+class BuyDialog;
+
namespace Net
{
@@ -52,6 +54,9 @@ class BuySellHandler notfinal
const int amount) const = 0;
virtual void close() const = 0;
+
+ virtual void cleanDialogReference(const BuyDialog *const dialog)
+ const = 0;
};
} // namespace Net
diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp
index 9a147347a..21769cef4 100644
--- a/src/net/ea/buysellhandler.cpp
+++ b/src/net/ea/buysellhandler.cpp
@@ -35,4 +35,10 @@ BuySellHandler::BuySellHandler()
BuySellRecv::mBuyDialog = nullptr;
}
+void BuySellHandler::cleanDialogReference(const BuyDialog *const dialog) const
+{
+ if (BuySellRecv::mBuyDialog == dialog)
+ BuySellRecv::mBuyDialog = nullptr;
+}
+
} // namespace Ea
diff --git a/src/net/ea/buysellhandler.h b/src/net/ea/buysellhandler.h
index 4343cd256..2c5e1caad 100644
--- a/src/net/ea/buysellhandler.h
+++ b/src/net/ea/buysellhandler.h
@@ -34,6 +34,9 @@ class BuySellHandler notfinal : public Net::BuySellHandler
BuySellHandler();
A_DELETE_COPY(BuySellHandler)
+
+ void cleanDialogReference(const BuyDialog *const dialog) const
+ override final;
};
} // namespace Ea