Previous 199869 Revisions Next

r23840 Friday 21st June, 2013 at 17:21:43 UTC by Oliver Stöneberg
chdman: fixed deletion of output file in case of an error (nw)
[src/tools]chdman.c

trunk/src/tools/chdman.c
r23839r23840
16351635   }
16361636   catch (...)
16371637   {
1638      delete chd;
16381639      // delete the output file
16391640      astring *output_chd_str = params.find(OPTION_OUTPUT);
16401641      if (output_chd_str != NULL)
16411642         osd_rmfile(*output_chd_str);
1642      delete chd;
16431643      throw;
16441644   }
16451645}
r23839r23840
18081808   }
18091809   catch (...)
18101810   {
1811      delete chd;
18111812      // delete the output file
18121813      astring *output_chd_str = params.find(OPTION_OUTPUT);
18131814      if (output_chd_str != NULL)
18141815         osd_rmfile(*output_chd_str);
1815      delete chd;
18161816      throw;
18171817   }
18181818}
r23839r23840
19001900   }
19011901   catch (...)
19021902   {
1903      delete chd;
19031904      // delete the output file
19041905      astring *output_chd_str = params.find(OPTION_OUTPUT);
19051906      if (output_chd_str != NULL)
19061907         osd_rmfile(*output_chd_str);
1907      delete chd;
19081908      throw;
19091909   }
19101910}
r23839r23840
20252025   }
20262026   catch (...)
20272027   {
2028      delete chd;
20282029      // delete the output file
20292030      astring *output_chd_str = params.find(OPTION_OUTPUT);
20302031      if (output_chd_str != NULL)
20312032         osd_rmfile(*output_chd_str);
2032      delete chd;
20332033      throw;
20342034   }
20352035}
r23839r23840
21502150   }
21512151   catch (...)
21522152   {
2153      delete chd;
21532154      // delete the output file
21542155      astring *output_chd_str = params.find(OPTION_OUTPUT);
21552156      if (output_chd_str != NULL)
21562157         osd_rmfile(*output_chd_str);
2157      delete chd;
21582158      throw;
21592159   }
21602160}

Previous 199869 Revisions Next


© 1997-2024 The MAME Team