[Digikam-devel] [Bug 131446] using inpainting plugin crashes DigiKam
Gilles Caulier
caulier.gilles at gmail.com
Mon Mar 12 15:38:58 GMT 2007
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=131446
------- Additional Comments From caulier.gilles gmail com 2007-03-12 16:38 -------
SVN commit 641782 by cgilles:
digikam from trunk : CImg library can generate a C++ exception. Just drive it to prevent digiKam crash.
CCBUGS: 131446
M +16 -13 greycstorationiface.cpp
--- trunk/extragear/graphics/digikamimageplugins/common/greycstoration/greycstorationiface.cpp #641781:641782
@ -18,18 +18,9 @
*
* ============================================================ */
- // C Ansi includes
-
-extern "C"
-{
-#include <unistd.h>
-}
-
// C++ includes.
-#include <cstdio>
-#include <cmath>
-#include <cstring>
+#include <cassert>
// Qt includes.
@ -209,10 +200,22 @
DDebug() << "GreycstorationIface::Process Computation..." << endl;
- //FIXME : add inpainting and resize mode.
+ try
+ {
+ //FIXME : add inpainting and resize mode.
+
+ restoration();
+ }
+ catch(...) // Everything went wrong.
+ {
+ DDebug() << "GreycstorationIface::Error during Greycstoration filter computation!" << endl;
+
+ if (m_parent)
+ postProgress( 0, false, false );
+
+ return;
+ }
- restoration();
-
// Copy CImg onto destination.
DDebug() << "GreycstorationIface::Finalization..." << endl;
More information about the Digikam-devel
mailing list