[PATCH] ui/kis_dlg_adjustment_layer.{cc, h}: don't enable OK button if no filter is selected (avoid crash)
Melchior FRANZ
mfranz at aon.at
Wed Feb 22 14:33:29 CET 2006
* Boudewijn Rempt -- Wednesday 22 February 2006 14:05:
> On Wednesday 22 February 2006 13:56, Melchior FRANZ wrote:
> > OK to commit?
>
> Certainly!
I asked because I've not done much in KDE since a few months, and it's
wise to not trust me. ;-)
| PS: I'll send another patch for automatically using the filter
| names once this crash here got fixed.
And this has to wait, because I get other adjustment layer crashes,
and don't want to add anything. This would only make it harder to fix
the current problems, and I couldn't easily say if *I* introduced a
problem (although the code is quite small and seems to work).
I just got this crash by just adding a few adjustment layers to an
image layer (IIRC):
(gdb) bt
#0 0x42c2d6e3 in KisPerChannelConfigWidget (this=0x8ba2bb8, parent=0x80000024, dev=@0xbfc73168,
name=0x80000024 <Address 0x80000024 out of bounds>, f=2147483684)
at /home/m/kde/koffice/krita/plugins/filters/colorsfilters/kis_perchannel_filter.cc:308
#1 0x42c2dd57 in KisPerChannelFilter::createConfigurationWidget (this=0x8328be8, parent=0x80000024, dev=@0x80000024)
at /home/m/kde/koffice/krita/plugins/filters/colorsfilters/kis_perchannel_filter.cc:175
#2 0x4270cea2 in KisDlgAdjustmentLayer::selectionHasChanged (this=0xbfc740ac, item=0x80000024)
at /home/m/kde/koffice/krita/ui/kis_dlg_adjustment_layer.cc:174
#3 0x4270d1c9 in KisDlgAdjustmentLayer::qt_invoke (this=0xbfc740ac, _id=87, _o=0xbfc73258) at kis_dlg_adjustment_layer.moc:97
(gdb) f 1
#1 0x42c2dd57 in KisPerChannelFilter::createConfigurationWidget (this=0x8328be8, parent=0x80000024, dev=@0x80000024)
at /home/m/kde/koffice/krita/plugins/filters/colorsfilters/kis_perchannel_filter.cc:175
175 return new KisPerChannelConfigWidget(parent, dev);
(gdb) list
170 }
171
172
173 KisFilterConfigWidget * KisPerChannelFilter::createConfigurationWidget(QWidget *parent, KisPaintDeviceSP dev)
174 {
175 return new KisPerChannelConfigWidget(parent, dev);
176 }
177
178 KisFilterConfiguration* KisPerChannelFilter::configuration(QWidget *nwidget)
179 {
(gdb) print dev
$1 = (KisPaintDeviceSP &) @0x80000024: Cannot access memory at address 0x80000024
(gdb) up
#2 0x4270cea2 in KisDlgAdjustmentLayer::selectionHasChanged (this=0xbfc740ac, item=0x80000024)
at /home/m/kde/koffice/krita/ui/kis_dlg_adjustment_layer.cc:174
174 activeLayer->paintDevice());
(gdb) list
169
170 KisPaintLayerSP activeLayer = (KisPaintLayer*) m_image->activeLayer().data();
171
172 if (activeLayer) {
173 m_currentConfigWidget = m_currentFilter->createConfigurationWidget(m_configWidgetHolder,
174 activeLayer->paintDevice());
175 }
176
177 if (m_currentConfigWidget != 0)
178 {
(gdb) print activeLayer
$2 = {ptr = 0x8b0ce10}
m.
More information about the kimageshop
mailing list