Skip to content

Commit

Permalink
fix double free error in crpropa-xmlrun
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidWalz committed Mar 23, 2016
1 parent 9c3f527 commit 8cea842
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/XmlExecute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,10 @@ bool XmlExecute::load(const string &filename) {
loadSpectrumComposition(node);

// ----- observers -----
/*observer = new Observer();*/
modules.add(&observer);
ref_ptr<Observer> observer = new Observer();
modules.add(observer);
if (is1D) {
observer.add(new ObserverPoint());
observer->add(new ObserverPoint());
} else {
node = root.child("Observers");
if (!node) {
Expand Down

0 comments on commit 8cea842

Please sign in to comment.