Commit ec1d2128 authored by Chris Pavlina's avatar Chris Pavlina Committed by Maciej Suminski

bugfix: Avoid rendering component preview if either dimension is 0 (eeschema).

parent 6aff7466
......@@ -346,6 +346,13 @@ void DIALOG_CHOOSE_COMPONENT::renderPreview( LIB_PART* aComponent, int aUnit )
NEGATE( offset.x );
NEGATE( offset.y );
// Avoid rendering when either dimension is zero
int width, height;
dc.GetSize( &width, &height );
if( !width || !height )
return;
aComponent->Draw( NULL, &dc, offset, aUnit, m_deMorganConvert, GR_COPY,
UNSPECIFIED_COLOR, DefaultTransform, true, true, false );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment