From eecb4690f18650b9139071301db63a24e6da0e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 14 May 2017 12:34:25 +0200 Subject: Fix crash on NULL pointer dereference This resolves Bug 2773 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- korganizer/koeditorfreebusy.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'korganizer') diff --git a/korganizer/koeditorfreebusy.cpp b/korganizer/koeditorfreebusy.cpp index 0ee9d4f8c..88c5414b3 100644 --- a/korganizer/koeditorfreebusy.cpp +++ b/korganizer/koeditorfreebusy.cpp @@ -850,10 +850,13 @@ void KOEditorFreeBusy::removeAttendee() void KOEditorFreeBusy::clearSelection() const { KDGanttViewItem *item = mGanttView->selectedItem(); - if ( item ) + if (item) { mGanttView->setSelected( item, false ); + } mGanttView->repaint(); - item->repaint(); + if (item) { + item->repaint(); + } } void KOEditorFreeBusy::setSelected( int index ) -- cgit v1.2.1