diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index 6b4c8addab..847eec4b60 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -63,6 +63,9 @@ static string trim_blanks(const string &str) { size_t first, last; + if(str.empty()) + return str; + first = 0; while (first < str.length() && isspace(str[first])) { first++;