Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KAlarm
Commits
452a3f1e
Commit
452a3f1e
authored
Oct 19, 2014
by
David Jarvie
Browse files
Fix possible null dereference (Coverity 1167310)
parent
98733067
Changes
1
Hide whitespace changes
Inline
Side-by-side
kaevent.cpp
View file @
452a3f1e
...
...
@@ -2970,22 +2970,18 @@ void KAEvent::setRecurrence(const KARecurrence& recurrence)
void
KAEventPrivate
::
setRecurrence
(
const
KARecurrence
&
recurrence
)
{
startChanges
();
// prevent multiple trigger time evaluation here
delete
mRecurrence
;
if
(
recurrence
.
recurs
())
{
delete
mRecurrence
;
mRecurrence
=
new
KARecurrence
(
recurrence
);
mRecurrence
->
setStartDateTime
(
mStartDateTime
.
effectiveKDateTime
(),
mStartDateTime
.
isDateOnly
());
mTriggerChanged
=
true
;
// Adjust sub-repetition values to fit the recurrence.
setRepetition
(
mRepetition
);
}
else
{
if
(
mRecurrence
)
mTriggerChanged
=
true
;
mRecurrence
=
0
;
}
// Adjust sub-repetition values to fit the recurrence.
setRepetition
(
mRepetition
);
clearRecur
();
endChanges
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment