From f8081ae941087ca1521d79d6ae9c30f82bcf0847 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 23 Apr 2012 03:21:18 +0000 Subject: Fix possible dereference of end iterator. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4255 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/ClientStore.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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) { -- cgit v1.2.1