Segfault in planar_layout if called on a graph with removed vertex

In graph_tool-2.43, attempting to draw a graph with removed vertex leads to a SEGFAULT if the planar_layout is used.

  from graph_tool import Graph
  from graph_tool.draw import (graph_draw, planar_layout)
  g=Graph(directed=True)
  v1=g.add_vertex()
  v2=g.add_vertex()
  v3=g.add_vertex()
  v4=g.add_vertex()
  g.add_edge(v1,v2)
  g.add_edge(v2,v3)
  g.add_edge(v1,v3)
  g.add_edge(v1,v4)
  g.remove_vertex(v3)
  # g.reindex_edges() # <-- uncomment to workaround
  pos=planar_layout(g)
  graph_draw(g,pos=pos)

Reindexing edges seems to fix the problem.

During the crash, the following line appears sometimes:

free(): invalid next size (fast)

Edited by Sergey M