summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-01-14 13:53:03 +0200
committerMichael Stahl <mstahl@redhat.com>2014-01-15 11:26:17 +0000
commit2158a26f25b67fdd2564d2e01c2a0a720ef7f2e1 (patch)
tree286194e5a277059d32eb924b0b51b36be55e33d4
parent8da7d7226777788bc957e474f5c9fcb9b78dc54e (diff)
fdo#47689: Avoid crashing mdworker: Don't use uninitialized variable
It's the isCustom field that should be checked to see whether the customAttribute field has been assigned or not. Change-Id: I5d2af26b675ab0cbc0e1844eb98ebaf5145eb73d Reviewed-on: https://gerrit.libreoffice.org/7417 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--extensions/source/macosx/spotlight/OOoMetaDataParser.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/source/macosx/spotlight/OOoMetaDataParser.m b/extensions/source/macosx/spotlight/OOoMetaDataParser.m
index a6ce40ac1368..0f1bad9a056d 100644
--- a/extensions/source/macosx/spotlight/OOoMetaDataParser.m
+++ b/extensions/source/macosx/spotlight/OOoMetaDataParser.m
@@ -172,7 +172,7 @@ static NSDictionary *metaXML2MDIKeys;
}
// cleanup part 1
[textCurrentElement release];
- if (customAttribute != nil) {
+ if (isCustom == YES) {
[customAttribute release];
}
}