diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-14 13:43:43 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-14 17:09:23 +0100 |
commit | 89b256f431c09097dd7bf3d163430ec54a7d9260 (patch) | |
tree | 61be6e3088ce54a2a2e70a7d8bba46388cd4513b /sc/source/ui/miscdlgs/datafdlg.cxx | |
parent | a3dc4db870ac3c08c480131ed18d144e42ec18b2 (diff) |
coverity#1242430 Dereference after null check
Change-Id: If1c59d6d06a9e4601731f13a69b1ac2603c0014b
Diffstat (limited to 'sc/source/ui/miscdlgs/datafdlg.cxx')
-rw-r--r-- | sc/source/ui/miscdlgs/datafdlg.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx index 8a5f2324ed0c..0d3f58d4fda0 100644 --- a/sc/source/ui/miscdlgs/datafdlg.cxx +++ b/sc/source/ui/miscdlgs/datafdlg.cxx @@ -209,14 +209,13 @@ ScDataFormDlg::~ScDataFormDlg() void ScDataFormDlg::FillCtrls(SCROW /*nCurrentRow*/) { - OUString aFieldName; for (sal_uInt16 i = 0; i < aColLength; ++i) { if (!maEdits.is_null(i)) { - if (nCurrentRow<=nEndRow) + if (nCurrentRow<=nEndRow && pDoc) { - aFieldName = pDoc->GetString(i + nStartCol, nCurrentRow, nTab); + OUString aFieldName(pDoc->GetString(i + nStartCol, nCurrentRow, nTab)); maEdits[i].SetText(aFieldName); } else |