summaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_Name.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/QPDF_Name.cc')
-rw-r--r--libqpdf/QPDF_Name.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/libqpdf/QPDF_Name.cc b/libqpdf/QPDF_Name.cc
index 9adb25b5..26bd8263 100644
--- a/libqpdf/QPDF_Name.cc
+++ b/libqpdf/QPDF_Name.cc
@@ -16,6 +16,10 @@ QPDF_Name::~QPDF_Name()
std::string
QPDF_Name::normalizeName(std::string const& name)
{
+ if (name.empty())
+ {
+ return name;
+ }
std::string result;
result += name[0];
for (unsigned int i = 1; i < name.length(); ++i)