aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/cpp_plugin.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/cpp_plugin.cc b/src/compiler/cpp_plugin.cc
index 57f25a1f75..acbe128213 100644
--- a/src/compiler/cpp_plugin.cc
+++ b/src/compiler/cpp_plugin.cc
@@ -58,6 +58,11 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
return false;
}
+ if (file->service_count() == 0) {
+ // No services. Do nothing.
+ return true;
+ }
+
grpc_cpp_generator::Parameters generator_parameters;
if (!parameter.empty()) {