summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-05-14 12:34:25 +0200
committerSlávek Banko <slavek.banko@axis.cz>2017-05-14 12:34:25 +0200
commiteecb4690f18650b9139071301db63a24e6da0e39 (patch)
tree3e2c0a8fd5ea176d2faa20de5a518f6611cb6bec
parent27787971c73ffcecd7fc8c894e843affb4313f38 (diff)
downloadtdepim-eecb4690.tar.gz
tdepim-eecb4690.zip
Fix crash on NULL pointer dereference
This resolves Bug 2773 Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--korganizer/koeditorfreebusy.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/korganizer/koeditorfreebusy.cpp b/korganizer/koeditorfreebusy.cpp
index 0ee9d4f8..88c5414b 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 )