From ef9b40f99443fabed972d29ce47c2ccb29e77210 Mon Sep 17 00:00:00 2001 From: zecke Date: Wed, 07 May 2003 16:01:45 +0000 Subject: Prevent mem corruption --- (limited to 'libopie2') diff --git a/libopie2/opiepim/oevent.cpp b/libopie2/opiepim/oevent.cpp index 56ea10d..3ba8a52 100644 --- a/libopie2/opiepim/oevent.cpp +++ b/libopie2/opiepim/oevent.cpp @@ -242,8 +242,13 @@ void OEvent::changeOrModify() { Data* d2 = new Data; d2->description = data->description; d2->location = data->location; - d2->manager = data->manager; - d2->recur = data->recur; + + if (data->manager ) + d2->manager = new OPimNotifyManager( *data->manager ); + + if ( data->recur ) + d2->recur = new ORecur( *data->recur ); + d2->note = data->note; d2->created = data->created; d2->start = data->start; @@ -251,10 +256,11 @@ void OEvent::changeOrModify() { d2->isAllDay = data->isAllDay; d2->timezone = data->timezone; d2->parent = data->parent; - d2->child = data->child; - if (d2->child ) + if ( data->child ) { + d2->child = new QArray( *data->child ); d2->child->detach(); + } data = d2; } -- cgit v0.9.0.2