Permalink
Browse files

qtcollider: when getting a QColor property, return 'nil' if QColor in…

…valid
  • Loading branch information...
1 parent 22f4727 commit b2bb1ddf190f31c4636c02f429ede16172b8d809 @jleben jleben committed May 2, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 QtCollider/Slot.cpp
View
5 QtCollider/Slot.cpp
@@ -89,6 +89,11 @@ void Slot::setString( PyrSlot *slot, const QString& arg )
void Slot::setColor( PyrSlot *slot, const QColor &c )
{
+ if(!c.isValid()) {
+ SetNil(slot);
+ return;
+ }
+
PyrObject *obj = instantiateObject( gMainVMGlobals->gc, class_Color, 0, true, true );
SetObject( slot, obj );

0 comments on commit b2bb1dd

Please sign in to comment.