summaryrefslogtreecommitdiff
path: root/ecp.cpp
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2003-07-29 01:18:33 +0000
committerweidai <weidai11@users.noreply.github.com>2003-07-29 01:18:33 +0000
commit9c5c4769a9c7a16aecc6cc7dd297bfe243dd022f (patch)
tree7a78ed3becd2c14f449d1cc66a58edd414256d94 /ecp.cpp
parent259ee22eba4e4e6471caa088479a93fbee894e11 (diff)
downloadcryptopp-git-9c5c4769a9c7a16aecc6cc7dd297bfe243dd022f.tar.gz
fix potential threading problem with initialization of static objects
Diffstat (limited to 'ecp.cpp')
-rw-r--r--ecp.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/ecp.cpp b/ecp.cpp
index f13ee287..d8984387 100644
--- a/ecp.cpp
+++ b/ecp.cpp
@@ -195,8 +195,7 @@ bool ECP::Equal(const Point &P, const Point &Q) const
const ECP::Point& ECP::Identity() const
{
- static const Point zero;
- return zero;
+ return Singleton<Point>().Ref();
}
const ECP::Point& ECP::Inverse(const Point &P) const