X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/69941f05864fa8b37856ccc1338124bfac756a2b..7e9414582703dc1c612b15155de450fcee3642fa:/src/html/m_image.cpp diff --git a/src/html/m_image.cpp b/src/html/m_image.cpp index 020c60230e..60bb5f5734 100644 --- a/src/html/m_image.cpp +++ b/src/html/m_image.cpp @@ -107,7 +107,7 @@ wxString wxHtmlImageMapAreaCell::GetLink( int x, int y ) const l = coords[ 0 ]; t = coords[ 1 ]; r = coords[ 2 ]; - d = sqrt( ((x - l) * (x - l)) + ((y - t) * (y - t)) ); + d = sqrt( (double) (((x - l) * (x - l)) + ((y - t) * (y - t))) ); if (d < (double)r) { return m_Link; @@ -445,12 +445,12 @@ TAG_HANDLER_BEGIN(IMG, "IMG, MAP, AREA") { cel = new wxHtmlImageMapAreaCell( wxHtmlImageMapAreaCell::RECT, coords ); } - if (cel && tag.HasParam("HREF")) + if (cel != NULL && tag.HasParam("HREF")) { wxString tmp = tag.GetParam("HREF"); cel->SetLink( tmp ); } - m_WParser->GetContainer()->InsertCell( cel ); + if (cel != NULL) m_WParser->GetContainer()->InsertCell( cel ); } }