Fix scan coverity issues:
CID 184299: Null pointer dereferences (FORWARD_NULL) CID 184297: Error handling issues (UNCAUGHT_EXCEPT) CID 184296: Uninitialized members (UNINIT_CTOR) CID 184292: Uninitialized members (UNINIT_CTOR)
This commit is contained in:
@@ -314,7 +314,11 @@ OrthoViews::~OrthoViews()
|
||||
for (int i = views.size() - 1; i >= 0; i--)
|
||||
delete views[i];
|
||||
|
||||
page->recomputeFeature();
|
||||
try {
|
||||
page->recomputeFeature();
|
||||
}
|
||||
catch (...) {
|
||||
}
|
||||
}
|
||||
|
||||
void OrthoViews::slotDeletedDocument(const App::Document& Obj)
|
||||
|
||||
@@ -155,6 +155,10 @@ class BoundBox
|
||||
public:
|
||||
BoundBox()
|
||||
{
|
||||
minX = 0;
|
||||
maxX = 0;
|
||||
minY = 0;
|
||||
maxY = 0;
|
||||
}
|
||||
|
||||
// generic: first point
|
||||
@@ -407,7 +411,7 @@ void CleanPath(const Path &inp, Path &outpt, double tolerance)
|
||||
long index;
|
||||
for (long i = 0; i < size; i++)
|
||||
{
|
||||
index = clpSegmentIndex + i;
|
||||
index = static_cast<long>(clpSegmentIndex + i);
|
||||
if (index >= size) index -= size;
|
||||
outpt.push_back(tmp.at(index));
|
||||
}
|
||||
@@ -842,6 +846,7 @@ class PerfCounter
|
||||
name = p_name;
|
||||
count = 0;
|
||||
running = false;
|
||||
start_ticks = 0;
|
||||
total_ticks = 0;
|
||||
}
|
||||
inline void Start()
|
||||
|
||||
@@ -347,7 +347,7 @@ bool SheetTableView::event(QEvent *event)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (event->type() == QEvent::ShortcutOverride) {
|
||||
else if (event && event->type() == QEvent::ShortcutOverride) {
|
||||
QKeyEvent * kevent = static_cast<QKeyEvent*>(event);
|
||||
if (kevent->modifiers() == Qt::NoModifier ||
|
||||
kevent->modifiers() == Qt::ShiftModifier ||
|
||||
|
||||
Reference in New Issue
Block a user