[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
Oliver.Kellogg at t-online.de
Sat Sep 13 10:46:06 UTC 2003
CVS commit by okellogg:
draw(): Strengthen defense.
M +4 -1 componentwidget.cpp 1.9
--- kdesdk/umbrello/umbrello/componentwidget.cpp #1.8:1.9
@@ -45,6 +45,9 @@ ComponentWidget::~ComponentWidget() {}
////////////////////////////////////////////////////////////////////////////////////////////////////
void ComponentWidget::draw(QPainter & p, int offsetX, int offsetY) {
+ UMLComponent *umlcomp = static_cast<UMLComponent*>(m_pObject);
+ if (umlcomp == NULL)
+ return;
p.setPen( UMLWidget::getLineColour() );
- if ( (static_cast<UMLComponent*>(m_pObject))->getExecutable() ) {
+ if ( umlcomp->getExecutable() ) {
QPen thickerPen = p.pen();
thickerPen.setWidth(2);
More information about the umbrello-devel
mailing list