mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-22 23:26:27 +02:00
cameo/ops.c (tool_comp_paths): don't crash if path list is empty
This commit is contained in:
parent
b8c927831f
commit
44d58a54fa
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* ops.c - Higher-level toolpath operations
|
||||
*
|
||||
* Written 2010-2012 by Werner Almesberger
|
||||
* Copyright 2010-2012 Werner Almesberger
|
||||
* Written 2010-2013 by Werner Almesberger
|
||||
* Copyright 2010-2013 Werner Almesberger
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -49,6 +49,8 @@ struct path *tool_comp_paths(const struct path *paths, int dog_bone,
|
||||
* explicitly tell cameo to treat the path as an outside edge.
|
||||
*/
|
||||
|
||||
if (!paths)
|
||||
return NULL;
|
||||
leftmost = path_find_leftmost(paths);
|
||||
for (path = paths; path; path = path->next)
|
||||
if (path != leftmost && (all_inside || !path->outside)) {
|
||||
|
Loading…
Reference in New Issue
Block a user