diff --git a/Data/include/Poco/Data/BLOB.h b/Data/include/Poco/Data/BLOB.h index 236e53875..2cc3b87d5 100644 --- a/Data/include/Poco/Data/BLOB.h +++ b/Data/include/Poco/Data/BLOB.h @@ -98,6 +98,8 @@ public: const char* rawContent() const; /// Returns the raw content. + /// + /// If the BLOB is empty, returns NULL. void assignRaw(const char* pChar, std::size_t count); /// Assigns raw content to internal storage. @@ -136,8 +138,10 @@ inline const std::vector& BLOB::content() const inline const char* BLOB::rawContent() const { - poco_assert (_pContent->size()); - return &(*_pContent)[0]; + if (_pContent->empty()) + return 0; + else + return &(*_pContent)[0]; }