diff options
Diffstat (limited to 'src/URI.cpp')
-rw-r--r-- | src/URI.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/URI.cpp b/src/URI.cpp index 67a26ee9..f7b64209 100644 --- a/src/URI.cpp +++ b/src/URI.cpp @@ -81,8 +81,11 @@ URI::URI(const URI& uri) URI& URI::operator=(const URI& uri) { - serd_node_free(&_node); - _node = serd_node_new_uri(&uri._uri, nullptr, &_uri); + if (&uri != this) { + serd_node_free(&_node); + _node = serd_node_new_uri(&uri._uri, nullptr, &_uri); + } + return *this; } |