Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
avoid crash when giving nullptr to QgsEditorWidgetWrapper::fromWidget
  • Loading branch information
3nids committed May 22, 2023
1 parent 73df7e5 commit eb97cf0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/editorwidgets/core/qgseditorwidgetwrapper.cpp
Expand Up @@ -54,6 +54,9 @@ QVariant QgsEditorWidgetWrapper::defaultValue() const

QgsEditorWidgetWrapper *QgsEditorWidgetWrapper::fromWidget( QWidget *widget )
{
if ( !widget )
return nullptr;

return qobject_cast<QgsEditorWidgetWrapper *>( widget->property( "EWV2Wrapper" ).value<QgsWidgetWrapper *>() );
}

Expand Down

0 comments on commit eb97cf0

Please sign in to comment.