diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2017-05-14 12:34:25 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2017-05-14 12:34:37 +0200 |
commit | c2cfb988940c980d3d5e89b20bba2968e513f27f (patch) | |
tree | 725560a9d17d2ffd4c1566f87d1e6e1aeed4873f | |
parent | 385fe5f783ef84b0d500c7cbae59ee697bee913b (diff) | |
download | tdepim-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.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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 ) |