* plugin.c (register_plugin_info): Produce an error message if the
plugin is not found in the hash table.
From-SVN: r241613
+2016-10-27 Nick Clifton <nickc@redhat.com>
+
+ * plugin.c (register_plugin_info): Produce an error message if the
+ plugin is not found in the hash table.
+
2016-10-27 Bin Cheng <bin.cheng@arm.com>
* match.pd ((convert1 (minmax ((convert2 (x) c)))) -> minmax (x c)):
register_plugin_info (const char* name, struct plugin_info *info)
{
void **slot = htab_find_slot (plugin_name_args_tab, name, NO_INSERT);
- struct plugin_name_args *plugin = (struct plugin_name_args *) *slot;
+ struct plugin_name_args *plugin;
+
+ if (slot == NULL)
+ {
+ error ("unable to register info for plugin '%s' - plugin name not found",
+ name);
+ return;
+ }
+ plugin = (struct plugin_name_args *) *slot;
plugin->version = info->version;
plugin->help = info->help;
}