summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-04-23 03:21:18 +0000
committerDavid Robillard <d@drobilla.net>2012-04-23 03:21:18 +0000
commitf8081ae941087ca1521d79d6ae9c30f82bcf0847 (patch)
tree46d64c7a99f3f9f31de55360f8f49aa729e34c9c
parent48c263b99e62643df08e601e1ce88f279fa7873b (diff)
downloadingen-f8081ae941087ca1521d79d6ae9c30f82bcf0847.tar.gz
ingen-f8081ae941087ca1521d79d6ae9c30f82bcf0847.tar.bz2
ingen-f8081ae941087ca1521d79d6ae9c30f82bcf0847.zip
Fix possible dereference of end iterator.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4255 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/client/ClientStore.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index 9f0059de..1356e5f7 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -286,8 +286,9 @@ ClientStore::put(const URI& uri,
is_patch, is_node, is_port, is_output);
// Check if uri is a plugin
- const Atom& type = properties.find(_uris->rdf_type)->second;
- if (type.type() == _uris->forge.URI) {
+ Iterator t = properties.find(_uris->rdf_type);
+ if (t != properties.end() && t->second.type() == _uris->forge.URI) {
+ const Atom& type = t->second;
const URI& type_uri = type.get_uri();
const Plugin::Type plugin_type = Plugin::type_from_uri(type_uri);
if (plugin_type == Plugin::Patch) {