Skip to content
  • Tusooa Windy's avatar
    Fix flake tests under asan · 50d51715
    Tusooa Windy authored and Alberto Flores's avatar Alberto Flores committed
    ShapeGroupContainerModel::remove() will call KoShapeGroup::invalidateSizeCache(),
    even when the shape group is going to be destroyed. This method is called after
    KoShapeGroup's destructor, so at this time we no longer have access to members of
    KoShapeGroup, i.e. its d-pointer. So this call will cause access violation as the
    instance `QScopedPointer<Private> d` in KoShapeGroup has already been destroyed.
    
    This is a result of getting rid of derived d-pointers, because if we use a derived
    d-pointer, it only gets destroyed in the ancestor class (KoShape). We temporarily
    fix this problem by manually call `model()->deleteOwnedShapes()` in KoShapeGroup's
    destructor.
    50d51715