coverity#705808 Dereference before null check

Change-Id: Ibeaf8989e54017f7cf30a4ffc3f639cd43983d03
This commit is contained in:
Caolán McNamara
2014-03-13 10:54:33 +00:00
parent fddde2b74a
commit ec76f39ab5

View File

@@ -969,11 +969,11 @@ sal_Bool OQueryTableView::ExistsAVisitedConn(const OQueryTableWindow* pFrom) con
OQueryTableConnection* pTemp = static_cast<OQueryTableConnection*>(*aIter); OQueryTableConnection* pTemp = static_cast<OQueryTableConnection*>(*aIter);
if (pTemp->IsVisited() && if (pTemp->IsVisited() &&
(pFrom == static_cast< OQueryTableWindow*>(pTemp->GetSourceWin()) || pFrom == static_cast< OQueryTableWindow*>(pTemp->GetDestWin()))) (pFrom == static_cast< OQueryTableWindow*>(pTemp->GetSourceWin()) || pFrom == static_cast< OQueryTableWindow*>(pTemp->GetDestWin())))
return pTemp != NULL; return true;
} }
} }
return sal_False; return false;
} }
void OQueryTableView::onNoColumns_throw() void OQueryTableView::onNoColumns_throw()