[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: KDChart crash
From: Dag Andersen <danders () get2net ! dk>
Date: 2010-06-22 8:07:48
Message-ID: 201006221007.48715.danders () get2net ! dk
[Download RAW message or body]
If a cooridateplane that is refrenced by another coordinatepalne is removed
from the chart, I get the following assert:
ASSERT: "planeLayout" in file
/opt.kde/src/kdesvn/koffice/plugins/chartshape/kdchart/src/KDChartChart.cpp,
line 509
So atm the user app is required to setReferenceCoordinatePlane( 0 ) before the
referenced plane is removed.
The patch makes it safe to remove a plane that references another plane.
--
Mvh.
Dag Andersen
["crash.diff" (text/x-patch)]
Index: KDChartChart.cpp
===================================================================
--- KDChartChart.cpp (revision 1140071)
+++ KDChartChart.cpp (working copy)
@@ -961,6 +961,12 @@
{
const int idx = d->coordinatePlanes.indexOf( plane );
if( idx != -1 ){
+ // Don't leave an invalid reference
+ Q_FOREACH ( AbstractCoordinatePlane *p, d->coordinatePlanes ) {
+ if ( p->referenceCoordinatePlane() == plane ) {
+ p->setReferenceCoordinatePlane( 0 );
+ }
+ }
d->coordinatePlanes.takeAt( idx );
disconnect( plane, SIGNAL( destroyedCoordinatePlane( AbstractCoordinatePlane* ) ),
d, SLOT( slotUnregisterDestroyedPlane( AbstractCoordinatePlane* ) ) );
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic