midimanager.cc: 2* bad erase ?

Report anything that appears to be a bug here.

Moderator: jesse

Post Reply
dcb
Posts: 1
Joined: Thu Oct 15, 2015 12:30 pm

midimanager.cc: 2* bad erase ?

Post by dcb »

[midimanager.cc:152] -> [midimanager.cc:151]: (error) Iterator 'res' used after element has been erased.
[midimanager.cc:154] -> [midimanager.cc:151]: (error) Iterator 'res' used after element has been erased.

Source code is

ports_by_device.erase (res);
ports_by_device.erase ((*res).second->name());

delete (*res).second;

The first erase rather invalidates the second and third lines.

Post Reply