[Libreoffice-commits] .: sw/source
Stephan Bergmann
sbergmann at kemper.freedesktop.org
Fri Nov 11 00:02:52 PST 2011
sw/source/filter/ww8/types.hxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit f289cf086d24bbc4d3f164c42f58cb492a5b2506
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Nov 11 09:02:38 2011 +0100
Do not use front of empty vector.
diff --git a/sw/source/filter/ww8/types.hxx b/sw/source/filter/ww8/types.hxx
index 012b87b..6efb2e7 100644
--- a/sw/source/filter/ww8/types.hxx
+++ b/sw/source/filter/ww8/types.hxx
@@ -36,7 +36,7 @@ namespace ww
class bytes : public std::vector<sal_uInt8>
{
public:
- const sal_uInt8* data() const { return &front(); }
+ const sal_uInt8* data() const { return empty() ? 0 : &front(); }
};
enum WordVersion {eWW2 = 2, eWW6 = 6, eWW7 = 7, eWW8 = 8};
More information about the Libreoffice-commits
mailing list