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
This commit is contained in:
@@ -140,16 +140,28 @@ static void
|
|||||||
TIFFwxWarningHandler(const char* module, const char* fmt, va_list ap)
|
TIFFwxWarningHandler(const char* module, const char* fmt, va_list ap)
|
||||||
{
|
{
|
||||||
if (module != NULL)
|
if (module != NULL)
|
||||||
wxLogWarning(_("tiff module: %s"), module);
|
wxLogWarning(_("tiff module: %s"), wxString::FromAscii(module).c_str());
|
||||||
wxVLogWarning((wxChar *) fmt, ap);
|
|
||||||
|
// FIXME: this is not terrible informative but better than crashing!
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
wxLogWarning(_("TIFF library warning."));
|
||||||
|
#else
|
||||||
|
wxVLogWarning(fmt, ap);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
TIFFwxErrorHandler(const char* module, const char* fmt, va_list ap)
|
TIFFwxErrorHandler(const char* module, const char* fmt, va_list ap)
|
||||||
{
|
{
|
||||||
if (module != NULL)
|
if (module != NULL)
|
||||||
wxLogError(_("tiff module: %s"), module);
|
wxLogError(_("tiff module: %s"), wxString::FromAscii(module).c_str());
|
||||||
wxVLogError((wxChar *) fmt, ap);
|
|
||||||
|
// FIXME: as above
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
wxLogError(_("TIFF library error."));
|
||||||
|
#else
|
||||||
|
wxVLogError(fmt, ap);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
Reference in New Issue
Block a user