summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/events/CreatePort.cpp4
-rw-r--r--src/server/events/Delta.cpp5
2 files changed, 3 insertions, 6 deletions
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp
index 04e9bf22..d0dcbaf3 100644
--- a/src/server/events/CreatePort.cpp
+++ b/src/server/events/CreatePort.cpp
@@ -90,9 +90,7 @@ CreatePort::CreatePort(Engine& engine,
bool
CreatePort::pre_process(PreProcessContext&)
{
- if (_port_type == PortType::UNKNOWN) {
- return Event::pre_process_done(Status::UNKNOWN_TYPE, _path);
- } else if (!_flow) {
+ if (_port_type == PortType::UNKNOWN || !_flow) {
return Event::pre_process_done(Status::UNKNOWN_TYPE, _path);
} else if (_path.is_root()) {
return Event::pre_process_done(Status::BAD_URI, _path);
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 4e4887c5..31f55306 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -184,9 +184,8 @@ Delta::pre_process(PreProcessContext& ctx)
// Get "prototype" for preset (node to save state for)
const auto p = _properties.find(uris.lv2_prototype);
- if (p == _properties.end()) {
- return Event::pre_process_done(Status::BAD_REQUEST, _subject);
- } else if (!_engine.world().forge().is_uri(p->second)) {
+ if (p == _properties.end() ||
+ !_engine.world().forge().is_uri(p->second)) {
return Event::pre_process_done(Status::BAD_REQUEST, _subject);
}