diff --git a/ChangeLog b/ChangeLog index a790ee716..cb6419dec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -74,6 +74,8 @@ 52. Fix auto-marking of played downloaded podcasts when connected via a local socket. 53. Fix playback of local files by inbuilt HTTP server. +54. In catata-tags.exe set unhandled exception handler, to prevent windows + crash dialog appearing. 1.4.2 ----- diff --git a/tags/main.cpp b/tags/main.cpp index ff3d0eead..411d5a1ce 100644 --- a/tags/main.cpp +++ b/tags/main.cpp @@ -29,6 +29,15 @@ #include "tags.h" #include "taghelper.h" +#ifdef Q_OS_WIN +#include +static long __stdcall exceptionHandler(EXCEPTION_POINTERS *p) +{ + Q_UNUSED(p) + ::exit(0); +} +#endif + static QString logFileName; static bool firstMsg=true; #if QT_VERSION < 0x050000 @@ -50,6 +59,10 @@ static void cantataQtMsgHandler(QtMsgType, const QMessageLogContext &, const QSt int main(int argc, char *argv[]) { + #ifdef Q_OS_WIN + // Prevent windows crash dialog from appearing... + SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)exceptionHandler); + #endif QCoreApplication app(argc, argv); if (3==app.arguments().length() || 4==app.arguments().length()) { if (4==app.arguments().length()) {