Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Fix crash if layout factory failed to create view from XML element #866

Merged

Conversation

jcfr
Copy link
Member

@jcfr jcfr commented Apr 25, 2019

No description provided.

@jcfr jcfr merged commit ac0ff49 into commontk:master Apr 25, 2019
@jcfr jcfr deleted the fix-crash-layoutmanager-if-fail-create-view branch April 25, 2019 15:09
@@ -475,6 +479,10 @@ QWidgetItem* ctkLayoutManager::widgetItemFromXML(QDomElement viewElement)
{
//Q_ASSERT(viewElement.tagName() == "view");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove this comment

@@ -484,7 +492,10 @@ void ctkLayoutManager::setupView(QDomElement viewElement, QWidget* view)
{
Q_UNUSED(viewElement);
Q_D(ctkLayoutManager);
Q_ASSERT(view);
if (!view)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we add a warning message somewhere if view creation fails?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants