Commit 450572be authored by Claes Sjofors's avatar Claes Sjofors

Ge journal fix to prevent memory corruption if actions are called in wrong order

parent 97c1d87e
...@@ -335,6 +335,11 @@ int GraphJournal::store( journal_eAction action, grow_tObject o) ...@@ -335,6 +335,11 @@ int GraphJournal::store( journal_eAction action, grow_tObject o)
action == journal_eAction_PostPaste || action == journal_eAction_PostPaste ||
action == journal_eAction_PostRename) { action == journal_eAction_PostRename) {
if ( current_idx >= (int)poslist.size()) {
cerr << "Journal file disorder" << endl;
return GE__SUCCESS;
}
switch ( action) { switch ( action) {
case journal_eAction_PostPropertiesSelect: case journal_eAction_PostPropertiesSelect:
poslist[current_idx].redo_pos = fp.tellp(); poslist[current_idx].redo_pos = fp.tellp();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment