diff options
author | David Tardon <dtardon@redhat.com> | 2017-04-02 16:49:46 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2017-04-02 16:49:46 +0200 |
commit | cc311975203a18f5cb8df7b7eab3064566ff62b6 (patch) | |
tree | 6590a3635bb29f6bc1159bd5ba0f1fcfafec87f9 | |
parent | baa52222078aa9d7774938eebfd1710b52b543b3 (diff) |
passing null c-string to std::string is undef. behavior
Change-Id: I54a0037ab133a91a8926de8e9cc8a91b61c01645
-rw-r--r-- | src/lib/ABWContentCollector.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ABWContentCollector.cpp b/src/lib/ABWContentCollector.cpp index 24502b0..0c7d102 100644 --- a/src/lib/ABWContentCollector.cpp +++ b/src/lib/ABWContentCollector.cpp @@ -796,8 +796,8 @@ void libabw::ABWContentCollector::collectHeaderFooter(const char *id, const char void libabw::ABWContentCollector::collectPageSize(const char *width, const char *height, const char *units, const char * /* pageScale */) { - std::string widthStr(width); - std::string heightStr(height); + std::string widthStr(width ? width : ""); + std::string heightStr(height ? height : ""); if (units) { widthStr.append(units); |