summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/macab
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-03-05 15:38:50 +0000
committerKurt Zenker <kz@openoffice.org>2008-03-05 15:38:50 +0000
commit40773d9b269d2977fd3d32df9b6e7a2598f4b004 (patch)
treee3c1ae13238eb94325a2a3b5baf55256c38f9ad4 /connectivity/source/drivers/macab
parent29690ce6a461c8f4d89b1d8b52d8d401926226fb (diff)
INTEGRATION: CWS aquavcl05_DEV300 (1.2.74); FILE MERGED
2008/01/29 09:09:59 ericb 1.2.74.1: #i83707# fix potential crash. Fixes proposed by P. Luby
Diffstat (limited to 'connectivity/source/drivers/macab')
-rwxr-xr-xconnectivity/source/drivers/macab/MacabRecord.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/connectivity/source/drivers/macab/MacabRecord.cxx b/connectivity/source/drivers/macab/MacabRecord.cxx
index 5a3ce3a9e973..4eb476ed9de8 100755
--- a/connectivity/source/drivers/macab/MacabRecord.cxx
+++ b/connectivity/source/drivers/macab/MacabRecord.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: MacabRecord.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: ihi $ $Date: 2007-09-13 17:53:20 $
+ * last change: $Author: kz $ $Date: 2008-03-05 16:38:50 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -101,7 +101,8 @@ void MacabRecord::insertAtColumn (CFTypeRef _value, ABPropertyType _type, const
fields[_column] = new macabfield;
fields[_column]->value = _value;
- CFRetain(fields[_column]->value);
+ if (fields[_column]->value)
+ CFRetain(fields[_column]->value);
fields[_column]->type = _type;
}
}
@@ -151,7 +152,8 @@ macabfield *MacabRecord::copy(const sal_Int32 i) const
macabfield *_copy = new macabfield;
_copy->type = fields[i]->type;
_copy->value = fields[i]->value;
- CFRetain(_copy->value);
+ if (_copy->value)
+ CFRetain(_copy->value);
return _copy;
}