commit 5bd75085736a255b984e25fdc215b409a4202ffd parent 7c1548a2cc09f6f37866781b79e2e632de8b299d Author: Nils Durner <durner@gnunet.org> Date: Thu, 3 Aug 2006 20:17:06 +0000 don't crash Qt applications Diffstat:
| M | src/plugins/thumbnailextractorqt.cc | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/plugins/thumbnailextractorqt.cc b/src/plugins/thumbnailextractorqt.cc @@ -50,12 +50,13 @@ void __attribute__ ((constructor)) thumnailextractorqt_init(void) int argc = 0; argv = strdup(""); - app = new QApplication(argc, &argv); + app = qApp ? NULL : new QApplication(argc, &argv); } void __attribute__ ((destructor)) thumnailextractorqt_done(void) { - delete app; + if (qApp == app) + delete app; free(argv); }