From 92dc399aeeab357c929f5fc6d46ce318df4d8796 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 27 Aug 2012 06:11:57 +0100 Subject: [PATCH] Continue last commit, don't crash if bad cache file when reading params --- remotevstclient.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/remotevstclient.cpp b/remotevstclient.cpp index b23cfbf..7443ec0 100644 --- a/remotevstclient.cpp +++ b/remotevstclient.cpp @@ -136,7 +136,11 @@ RemoteVSTClient::addFromFd(int fd, PluginRecord &rec) // std::cerr << rec.parameters << " parameters" << std::endl; for (int i = 0; i < rec.parameters; ++i) { - tryRead(fd, buffer, 64); + try { + tryRead(fd, buffer, 64); + } catch (RemotePluginClosedException) { + return false; // plugin check failed + } rec.parameterNames.push_back(std::string(buffer)); float f; tryRead(fd, &f, sizeof(float));