Avoid crashes in SaveAs windows
Review Request #114483 - Created Dec. 15, 2013 and submitted
Due to my ugly changes to the code, KBibTeX now crashes with every SaveAs or initial Save operation. Sorry. My C++ skills are too low to determine where dlg should be deleted, so I hope it would be deleted with p.
No more crashes in SaveAs.
I can reproduce the crash; thank you for finding it and proposing a solution. Please be careful of removing "delete"s just because they are the point in a program where you get a crash. Sometimes those crashes are due to problems earlier in the program's execution and the "delete" makes the only visible. Thus, removing the "delete"s only hides the problem. In my fix, which I will commit soon, will simply call "deleteLater" on the dlg object. This is usually a safer approach if a plain "delete" fails. For details on "deleteLater", please see here: http://qt-project.org/doc/qt-4.8/qobject.html#deleteLater