Commit e93ace6b authored by Sharaf Zaman's avatar Sharaf Zaman
Browse files

Fix nullptr dereference in pattern generator

If while dragging we click outside of the window bounds, none of the
pattern is selected resulting in:
widget()->patternChooser->currentResource() pointing to a nullptr. But
with includeHidden flag enabled we can still reference the last selected
pattern. So, this seems like a minor error (i.e operating on only "non
hidden" resource).

parent 2264a44b
Pipeline #246407 passed with stage
in 52 minutes and 22 seconds
......@@ -101,7 +101,7 @@ KisPropertiesConfigurationSP KisWdgPattern::configuration() const
if (pattern) {
config->setProperty("pattern", pattern->name());
config->setProperty("md5sum", pattern->md5Sum());
config->setProperty("fileName", widget()->patternChooser->currentResource()->filename());
config->setProperty("fileName", pattern->filename());
config->setProperty("transform_offset_x", m_widget->spbOffsetX->value());
Supports Markdown
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