Commit 0aeed434 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).

BUG:459906
(cherry picked from commit e93ace6b)
parent 231726c6
......@@ -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