Make sure resolution is not inf

Fixes part of bug 205084
CCBUG: 205084

svn path=/trunk/KDE/kdegraphics/okular/; revision=1072172
This commit is contained in:
Albert Astals Cid 2010-01-09 15:08:53 +00:00
parent ea7480e2a5
commit edd82d80c6

View file

@ -156,8 +156,8 @@ void DviGenerator::fillViewportFromAnchor( Okular::DocumentViewport &vp,
SimplePageSize ps = m_dviRenderer->sizeOfPage( vp.pageNumber );
double resolution = 0;
resolution = (double)(pW)/ps.width().getLength_in_inch();
if (ps.isValid()) resolution = (double)(pW)/ps.width().getLength_in_inch();
else resolution = m_resolution;
double py = (double)anch.distance_from_top.getLength_in_inch()*resolution + 0.5;