[Git][wxwidgets/wxwidgets][master] Avoid assertion message when drawing uninitialized bitmap with GTK3, see #18520

1 view
Skip to first unread message

Vadim Zeitlin

unread,
Oct 6, 2019, 12:32:37 PM10/6/19
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • 2704c679
    by Paul Cornett at 2019-10-06T16:07:50Z
    Avoid assertion message when drawing uninitialized bitmap with GTK3, see #18520
    

1 changed file:

Changes:

  • src/gtk/bitmap.cpp
    ... ... @@ -1294,7 +1294,12 @@ void wxBitmap::SetSourceSurface(cairo_t* cr, int x, int y, const wxColour* fg, c
    1294 1294
             cairo_set_source_surface(cr, bmpData->m_surface, x, y);
    
    1295 1295
             return;
    
    1296 1296
         }
    
    1297
    -    wxCHECK_RET(bmpData->m_pixbufNoMask, "no bitmap data");
    
    1297
    +
    
    1298
    +    // Silently ignore attempts to draw uninitialized bitmap,
    
    1299
    +    // because other platforms don't complain about it
    
    1300
    +    if (bmpData->m_pixbufNoMask == NULL)
    
    1301
    +        return;
    
    1302
    +
    
    1298 1303
         if (bmpData->m_bpp == 1)
    
    1299 1304
             SetSourceSurface1(bmpData, cr, x, y, fg, bg);
    
    1300 1305
         else
    


View it on GitLab.
You're receiving this email because of your account on gitlab.com. If you'd like to receive fewer emails, you can adjust your notification settings.

Reply all
Reply to author
Forward
0 new messages