Commit 301d33e7 authored by Gopalakrishna Bhat A's avatar Gopalakrishna Bhat A

Fix crash on creating a new document in words.

parent 05587cf0
......@@ -69,7 +69,11 @@ KoResourcePopupAction::KoResourcePopupAction(KoAbstractResourceServerAdapter *re
resourceModel->setColumnCount(1);
}
KoResource *resource = resourceAdapter->resources().at(0);
KoResource *resource = 0;
if (resourceAdapter->resources().count() > 0) {
resource = resourceAdapter->resources().at(0);
}
KoAbstractGradient *gradient = dynamic_cast<KoAbstractGradient*>(resource);
KoPattern *pattern = dynamic_cast<KoPattern*>(resource);
if (gradient) {
......
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