mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-25 02:45:38 +00:00
djvu: Initialize to white if rendering fails
It's what ddjvu does, and also it's not nice to return an uninitialzed image back to the user BUGS: 377202
This commit is contained in:
parent
7da5adce57
commit
0419812ad7
|
@ -494,6 +494,10 @@ QImage KDjVu::Private::generateImageTile( ddjvu_page_t *djvupage, int& res,
|
|||
ddjvu_page_get_width( djvupage );
|
||||
res = ddjvu_page_render( djvupage, DDJVU_RENDER_COLOR,
|
||||
&pagerect, &renderrect, m_format, res_img.bytesPerLine(), (char *)res_img.bits() );
|
||||
if (!res)
|
||||
{
|
||||
res_img.fill(Qt::white);
|
||||
}
|
||||
#ifdef KDJVU_DEBUG
|
||||
qDebug() << "rendering result:" << res;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue