[Libreoffice-commits] core.git: dbaccess/source
Andrzej J.R. Hunt
andrzej at ahunt.org
Fri Aug 2 06:41:26 PDT 2013
dbaccess/source/ui/tabledesign/TableController.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit c5fb2644c92c8012b66cf2d1a12d6ce666beed25
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date: Fri Aug 2 10:24:57 2013 +0200
Check that xKeys exists before using.
Currently base segfaults here when using a database driver that doesn't
support sdbcx, the internal sdbcx wrapper doesn't implement getKeys()
either.
Change-Id: I195dfa891b4e38e6e0f5a9286bcbfa66ca818e28
Reviewed-on: https://gerrit.libreoffice.org/5243
Reviewed-by: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Tested-by: LuboÅ¡ LuÅák <l.lunak at suse.cz>
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index f17ff9b..f75b3e8 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -774,6 +774,8 @@ void OTableController::appendPrimaryKey(Reference<XKeysSupplier>& _rxSup,sal_Boo
OSL_ENSURE(_rxSup.is(),"No XKeysSupplier!");
Reference<XIndexAccess> xKeys(_rxSup->getKeys(),UNO_QUERY);
Reference<XPropertySet> xProp;
+ if (!xKeys.is())
+ return;
const sal_Int32 nCount = xKeys->getCount();
for(sal_Int32 i=0;i< nCount ;++i)
{
More information about the Libreoffice-commits
mailing list