From 641fc8c776bad4b39d0afa11d40954ca3d28ddaf Mon Sep 17 00:00:00 2001 From: tux3 Date: Wed, 4 Mar 2015 22:13:42 +0100 Subject: [PATCH] Catch OpenCV errors Should help with #1240 --- src/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index be266c6d1..331f8e012 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include @@ -61,6 +62,14 @@ void myMessageHandler(QtMsgType type, const QMessageLogContext& ctxt, const QStr } #endif +int opencvErrorHandler(int status, const char* func_name, const char* err_msg, + const char* file_name, int line, void*) +{ + qWarning() << "OpenCV: ERROR ("<applicationDirPath() != "/Applications/qtox.app/Contents/MacOS") { qDebug() << "OS X: Not in Applications folder";