X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftags%2Fstable%2Fsrc%2Fmodules%2Flyr_std%2Fwarp.cpp;h=60a41c7a36a9bf8a51b5f5778b574c180b90726e;hb=684cf1db661a9a5cbc142238cf05d6d2f7aa3f89;hp=f3767aebe0bc61c5977c5099c1686d90a916c2ce;hpb=40dd10f62f1b0983b20cf99dd4780ea73236eb0c;p=synfig.git diff --git a/synfig-core/tags/stable/src/modules/lyr_std/warp.cpp b/synfig-core/tags/stable/src/modules/lyr_std/warp.cpp index f3767ae..60a41c7 100644 --- a/synfig-core/tags/stable/src/modules/lyr_std/warp.cpp +++ b/synfig-core/tags/stable/src/modules/lyr_std/warp.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -613,6 +614,16 @@ Warp::accelerated_render(Context context,Surface *surface,int quality, const Ren Point min_point(bounding_rect.get_min()); Point max_point(bounding_rect.get_max()); + // we're going to divide by the different of these pairs soon; + // if they're the same, we'll be dividing by zero, and we don't + // want to do that! + // \todo what should we do in this case? + if (min_point[0] == max_point[0] || min_point[1] == max_point[1]) + { + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + surface->clear(); + return true; + } if(tl[0]>br[0]) {