]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't access the first character of a possible empty USEMAP parameter.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 18 Dec 2009 14:47:25 +0000 (14:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 18 Dec 2009 14:47:25 +0000 (14:47 +0000)
This fixes an assert when using debug CRT in VC9.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/m_image.cpp

index 43904eac7856f20e531add622d95910c9ba2f629..1bedf04ec0cb648d270eaec1d1bd11bc5ddc56bc 100644 (file)
@@ -651,7 +651,7 @@ TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA")
                 if (tag.HasParam(wxT("USEMAP")))
                 {
                     mn = tag.GetParam( wxT("USEMAP") );
-                    if (mn.GetChar(0) == wxT('#'))
+                    if ( !mn.empty() && *mn.begin() == '#' )
                     {
                         mn = mn.Mid( 1 );
                     }