Code

Add needed null check.
authorJon A. Cruz <jon@joncruz.org>
Tue, 23 Mar 2010 07:32:40 +0000 (00:32 -0700)
committerJon A. Cruz <jon@joncruz.org>
Tue, 23 Mar 2010 07:32:40 +0000 (00:32 -0700)
src/widgets/swatch-selector.cpp

index 602adec4fd4c47f004321da1078b0384b70359fd..a6f5133b799861adf64060caa61d5c9226c48358 100644 (file)
@@ -108,7 +108,7 @@ void SwatchSelector::_changedCb(SPColorSelector */*csel*/, void *data)
 
         // TODO might have to block cycles
 
-        if (swsel->_gsel) {
+        if (swsel->_gsel && swsel->_gsel->getVector()) {
             SPGradient *gradient = swsel->_gsel->getVector();
             SPGradient *ngr = sp_gradient_ensure_vector_normalized(gradient);
             if (ngr != gradient) {