Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/sage/graphs/planarity.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def is_planar(g, kuratowski=False, set_pos=False, set_embedding=False):
elif status == NONEMBEDDABLE:
# We now know that the graph is nonplanar.
if not kuratowski:
gp_Free(&theGraph)
return False
# With just the current edges, we have a nonplanar graph,
# so to isolate a kuratowski subgraph, just keep going.
Expand All @@ -150,6 +151,7 @@ def is_planar(g, kuratowski=False, set_pos=False, set_embedding=False):
if status == NONEMBEDDABLE:
# Kuratowski subgraph isolator
if not kuratowski:
gp_Free(&theGraph)
return False
g_dict = {}
for i in range(1, theGraph.N + 1):
Expand Down