Changeset 536


Ignore:
Timestamp:
Aug 19, 2016, 9:07:34 PM (4 years ago)
Author:
Gregg Young
Message:

Fixed trap caused by trying to open a broken pdf file (it had no pages just a table of contents) Ticket #288

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/gui/lucidethumbs.cpp

    r458 r536  
    299299    }
    300300
    301     // render first page
     301    // render first page if there is one
     302    if ( doc->getPageCount( ev ) <= 0 )
     303        return;
    302304    double width = 0, height = 0;
    303305    doc->getPageSize( ev, 0, &width, &height );
     306    if ( width <= 0 || height <= 0 )
     307        return;
    304308    double zoom = std::min( (double)LUTHUMB_SIZE_X / width, (double)LUTHUMB_SIZE_Y / height );
    305309    short bpp = doc->getBpp( ev );
Note: See TracChangeset for help on using the changeset viewer.