Fix segfault when pasting strokes (regression due to #1511)

Temporary point array was allocated using glib instead of new
presentation
Bryan Tan 7 years ago
parent 334e509858
commit d1cae6f87e
  1. 2
      src/model/Stroke.cpp

@ -91,7 +91,7 @@ void Stroke::readSerialized(ObjectInputStream& in)
int count{};
in.readData((void**) &p, &count);
this->points = std::vector<Point>{p, p + count};
delete[] p;
g_free(p);
this->lineStyle.readSerialized(in);
in.endObject();

Loading…
Cancel
Save