Index: Driver/Source/Connection.cs =================================================================== --- Driver/Source/Connection.cs (revision 1267) +++ Driver/Source/Connection.cs (working copy) @@ -248,14 +248,16 @@ "Not allowed to change the 'ConnectionString' property while the connection (state=" + State + ")."); + string str_val = (null != value ? value : ""); + MySqlConnectionStringBuilder newSettings; lock (connectionStringCache) { - newSettings = (MySqlConnectionStringBuilder)connectionStringCache[value]; + newSettings = (MySqlConnectionStringBuilder)connectionStringCache[str_val]; if (null == newSettings) { - newSettings = new MySqlConnectionStringBuilder(value); - connectionStringCache.Add(value, newSettings); + newSettings = new MySqlConnectionStringBuilder(str_val); + connectionStringCache.Add(str_val, newSettings); } }