diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-01-28 12:38:42 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-01-28 12:38:42 +0100 |
commit | 179c9c4f78c6cd7d0556cf85b36c586323331c8d (patch) | |
tree | 6b9970fea4a8032810f88213b06253bb3cea2c0b /solenv | |
parent | 6d850419434c5df8cfdcd7682d49bc3d92b8de83 (diff) |
Only call data()/length() when self is valid()
Change-Id: Icd9c12a10d2183a5159a3aa7a70e90494e8a8183
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gdb/libreoffice/util/string.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/solenv/gdb/libreoffice/util/string.py b/solenv/gdb/libreoffice/util/string.py index 5ad0e8d8fd30..34cabde3afad 100644 --- a/solenv/gdb/libreoffice/util/string.py +++ b/solenv/gdb/libreoffice/util/string.py @@ -41,9 +41,9 @@ class StringPrinterHelper(object): self.encoding = encoding def to_string(self): - data = self.data() - len = self.length() if self.valid(): + data = self.data() + len = self.length() return self.make_string(data, self.encoding, len) else: return "unintialized %s" % self.typename |