Skip to content
Permalink
Browse files
Fix crash when 'use popup' is selected for time based datetime widgets
  • Loading branch information
nyalldawson committed Sep 5, 2016
1 parent cd23621 commit 63cc762
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
@@ -67,7 +67,7 @@ void QgsDateTimeEditWrapper::initWidget( QWidget *editor )

const bool calendar = config( "calendar_popup", false ).toBool();
mQDateTimeEdit->setCalendarPopup( calendar );
if ( calendar )
if ( calendar && mQDateTimeEdit->calendarWidget() )
{
// highlight today's date
QTextCharFormat todayFormat;
@@ -156,7 +156,7 @@ void QgsDateTimeSearchWidgetWrapper::initWidget( QWidget* editor )

const bool calendar = config( "calendar_popup", false ).toBool();
mDateTimeEdit->setCalendarPopup( calendar );
if ( calendar )
if ( calendar && mDateTimeEdit->calendarWidget() )
{
// highlight today's date
QTextCharFormat todayFormat;

0 comments on commit 63cc762

Please sign in to comment.