Commit 6bc1d529 authored by Halla Rempt's avatar Halla Rempt

Check there are actually patterns

parent bc7a8809
......@@ -75,7 +75,9 @@ KoResource * KisPatternChooser::currentResource()
{
if (!m_itemChooser->currentResource()) {
KoResourceServer<KoPattern> * rserver = KoResourceServerProvider::instance()->patternServer(false);
m_itemChooser->setCurrentResource(rserver->resources().first());
if (rserver->resources().size() > 0) {
m_itemChooser->setCurrentResource(rserver->resources().first());
}
}
return m_itemChooser->currentResource();
}
......
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