fix scan coverity issues: unchecked dynamic_cast

This commit is contained in:
wmayer
2017-04-11 12:45:02 +02:00
parent 09dfcf6bd7
commit 292fdebe49
6 changed files with 20 additions and 15 deletions

View File

@@ -115,6 +115,8 @@ void QGIViewImage::draw()
}
auto viewImage( dynamic_cast<TechDraw::DrawViewImage*>(getViewObject()) );
if (!viewImage)
return;
QRectF newRect(0.0,0.0,Rez::guiX(viewImage->Width.getValue()),Rez::guiX(viewImage->Height.getValue()));
double pad = Rez::guiX(1.0);
m_cliparea->setRect(newRect.adjusted(-pad,-pad,pad,pad));