Skip to content
Permalink
Browse files

Fix crash when 'use popup' is selected for time based datetime widgets

(cherry-picked from 63cc762)
  • Loading branch information
nyalldawson committed Sep 14, 2016
1 parent 7ac9807 commit 34d7c3b83494af1aae317b2584060997e13cd7f7
@@ -66,7 +66,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 34d7c3b

Please sign in to comment.
You can’t perform that action at this time.