summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorMathias Hasselmann <mathias@openismus.com>2013-03-20 00:33:03 +0100
committerFridrich Strba <fridrich@documentfoundation.org>2013-03-21 07:30:47 +0000
commit4f6514eb0904f79b7c2db0958dc580bcf716911c (patch)
treef71ae1288fdb9e6879a1a137b0f23a6949a9780a /dbaccess
parent322257d53202f4d6bf3e7fa687c3902b4c61d794 (diff)
Don't complain about missing colon in empty DSN
Empty datasource names occur with the datasource wizard's first page when no datasource type has been selected yet. Change-Id: I9bcd025aab046e6cb79db47564f55ae3f0faed55 Reviewed-on: https://gerrit.libreoffice.org/2885 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/misc/dsntypes.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 77814e5e1f19..0c02d64d6949 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -342,8 +342,12 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const OUString& _rDsn) const
sal_Int32 nSeparator = sDsn.indexOf(static_cast<sal_Unicode>(':'));
if (-1 == nSeparator)
{
- // there should be at least one such separator
- OSL_FAIL("ODsnTypeCollection::implDetermineType : missing the colon !");
+ if (!sDsn.isEmpty())
+ {
+ // there should be at least one such separator
+ OSL_FAIL("ODsnTypeCollection::implDetermineType : missing the colon !");
+ }
+
return DST_UNKNOWN;
}