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:37 +0200
commitc2cfb988940c980d3d5e89b20bba2968e513f27f (patch)
tree725560a9d17d2ffd4c1566f87d1e6e1aeed4873f
parent385fe5f783ef84b0d500c7cbae59ee697bee913b (diff)
downloadtdepim-c2cfb988940c980d3d5e89b20bba2968e513f27f.tar.gz
tdepim-c2cfb988940c980d3d5e89b20bba2968e513f27f.zip
Fix crash on NULL pointer dereference
This resolves Bug 2773 Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit eecb4690f18650b9139071301db63a24e6da0e39)
-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 )