From e4f0e73d60088a328d88dd1a8bc8dbad1ccb9752 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 24 Jun 2005 12:29:22 +0000 Subject: [PATCH] at least not crash in case of TIFF warnings/errors in Unicode build (but we still don't show them correctly neither) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/imagtiff.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/common/imagtiff.cpp b/src/common/imagtiff.cpp index 749f744de0..e1cfedc795 100644 --- a/src/common/imagtiff.cpp +++ b/src/common/imagtiff.cpp @@ -140,16 +140,28 @@ static void TIFFwxWarningHandler(const char* module, const char* fmt, va_list ap) { if (module != NULL) - wxLogWarning(_("tiff module: %s"), module); - wxVLogWarning((wxChar *) fmt, ap); + wxLogWarning(_("tiff module: %s"), wxString::FromAscii(module).c_str()); + + // FIXME: this is not terrible informative but better than crashing! +#if wxUSE_UNICODE + wxLogWarning(_("TIFF library warning.")); +#else + wxVLogWarning(fmt, ap); +#endif } static void TIFFwxErrorHandler(const char* module, const char* fmt, va_list ap) { if (module != NULL) - wxLogError(_("tiff module: %s"), module); - wxVLogError((wxChar *) fmt, ap); + wxLogError(_("tiff module: %s"), wxString::FromAscii(module).c_str()); + + // FIXME: as above +#if wxUSE_UNICODE + wxLogError(_("TIFF library error.")); +#else + wxVLogError(fmt, ap); +#endif } } // extern "C" -- 2.45.2