Merge pull request #284 from morrolinux/CTRL-Z-deletion-fix

[BUGFIX] - CTRL-Z deletion recovery segfault
presentation
andreasb242 7 years ago committed by GitHub
commit bb02242af3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/model/Layer.cpp

@ -82,6 +82,9 @@ void Layer::insertElement(Element* e, int pos)
}
}
if(pos == -1) pos=0; //otherwise it segfaults on the next step trying
//to access a negative index on the elements array
this->elements.insert(this->elements.begin() + pos, e);
}

Loading…
Cancel
Save