diff options
| author | Gordon Sim <gsim@apache.org> | 2008-12-04 09:25:33 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-12-04 09:25:33 +0000 |
| commit | 445a6dfa1468cbb80ec473abefb1099435a871ce (patch) | |
| tree | 553631dff6515df4dbfb1746fb3d3f69366e51dc /cpp/src/qpid/framing | |
| parent | 6a7490ea9ae615dfec483bbc347ccdc9b2c2d8b3 (diff) | |
| download | qpid-python-445a6dfa1468cbb80ec473abefb1099435a871ce.tar.gz | |
QPID-1514: Add check for presence of key to FieldTable::erase()
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@723263 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing')
| -rw-r--r-- | cpp/src/qpid/framing/FieldTable.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/qpid/framing/FieldTable.cpp b/cpp/src/qpid/framing/FieldTable.cpp index 7ff5a07c9a..7260261970 100644 --- a/cpp/src/qpid/framing/FieldTable.cpp +++ b/cpp/src/qpid/framing/FieldTable.cpp @@ -232,7 +232,8 @@ bool FieldTable::operator==(const FieldTable& x) const { void FieldTable::erase(const std::string& name) { - values.erase(values.find(name)); + if (values.find(name) != values.end()) + values.erase(name); } } |
