Revision 1194778

Go back to digest for 14th November 2010

Bug Fixes in Educational

Jens-Michael Hoffmann committed changes in /branches/KDE/4.5/kdeedu/marble/src/lib/geodata/data/GeoDataPlacemark_p.h:

GeoDataPlacemark: Fix potential crash.

In the assignment operator of GeoDataPlacemarkPrivate m_geometry is deleted
without setting the pointer to 0 afterwards. In case the "other"
GeoDataPlacemarkPrivate does not have a geometry this might lead to a
double delete.

Besides that, the return statement might cause problems in case code
is added at the end of the method without carefully looking.

In addtition the geometry assignment is now (well, kind of) exception-safe.
Even if exceptions are not used it seems nicer to use an existing wide spread
idiom ("first do the real work w/o modifying state, then assign").

This is a backport of svn commit 1194384.

File Changes

Modified 1 files
  • /branches/KDE/4.5/kdeedu/marble/src/lib/geodata/data/GeoDataPlacemark_p.h
1 files changed in total