Commit a1c2b2b5 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Check return value

CID:249012
parent 25dcc503
......@@ -49,17 +49,21 @@ KisConvertHeightToNormalMapFilter::KisConvertHeightToNormalMapFilter(): KisFilte
void KisConvertHeightToNormalMapFilter::processImpl(KisPaintDeviceSP device, const QRect &rect, const KisFilterConfigurationSP config, KoUpdater *progressUpdater) const
{
Q_ASSERT(device != 0);
Q_ASSERT(device);
KisFilterConfigurationSP configuration = config ? config : new KisFilterConfiguration(id().id(), 1);
KisLodTransformScalar t(device);
QVariant value;
configuration->getProperty("horizRadius", value);
float horizontalRadius = t.scale(value.toFloat());
configuration->getProperty("vertRadius", value);
float verticalRadius = t.scale(value.toFloat());
float horizontalRadius = 1.0;
if (configuration->getProperty("horizRadius", value)) {
horizontalRadius = t.scale(value.toFloat());
}
float verticalRadius = 1.0;
if (configuration->getProperty("vertRadius", value)) {
verticalRadius = t.scale(value.toFloat());
}
QBitArray channelFlags;
if (configuration) {
......
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