From 147c8e03bb214f85cd5906ddc6413c4293c4baa9 Mon Sep 17 00:00:00 2001 From: cilix42 Date: Wed, 18 Jun 2008 22:29:59 +0000 Subject: [PATCH] Improve comments and catch missing desktop in effect.cpp --- src/live_effects/effect.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 08745a74e..4e500a498 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -251,9 +251,9 @@ Effect::doBeforeEffect (SPLPEItem */*lpeitem*/) } /** - * Effects have a parameter path set before they are applied by accepting a nonzero number of mouse - * clicks. This method activates the pen context, which waits for the specified number of clicks. - * Override Effect::acceptsNumParams() to set the number of expected mouse clicks. + * Effects can have a parameter path set before they are applied by accepting a nonzero number of + * mouse clicks. This method activates the pen context, which waits for the specified number of + * clicks. Override Effect::acceptsNumParams() to return the number of expected mouse clicks. */ void Effect::doAcceptPathPreparations(SPLPEItem *lpeitem) @@ -426,11 +426,12 @@ Effect::addPointParamHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem void Effect::addHelperPaths(SPLPEItem *lpeitem, SPDesktop *desktop) { + g_return_if_fail(desktop); g_return_if_fail(SP_IS_PATH(lpeitem)); if (providesKnotholder() && showOrigPath()) { // TODO: we assume that if the LPE provides its own knotholder, there is no nodepath so we - // must create the helper curve for the original path manually; when we allow nodepaths and + // must create the helper curve for the original path manually; once we allow nodepaths and // knotholders alongside each other, this needs to be rethought! SPCanvasItem *canvasitem = sp_nodepath_generate_helperpath(desktop, SP_PATH(lpeitem)); // TODO: Make sure the tempitem doesn't get destroyed when the mouse leaves the item -- 2.30.2