fixed YACReaderFlowGL::remove out of bounds crash

This commit is contained in:
Luis Ángel San Martín 2014-10-12 00:07:56 +02:00
parent 51cf77faca
commit 6874d95c5d

View File

@ -710,6 +710,9 @@ void YACReaderFlowGL::insert(char *name, GLuint Tex, float x, float y,int item)
void YACReaderFlowGL::remove(int item) void YACReaderFlowGL::remove(int item)
{ {
if(item < 0 || item >= paths.size())
return;
startAnimationTimer(); startAnimationTimer();
loaded.remove(item); loaded.remove(item);
@ -974,7 +977,7 @@ void YACReaderFlowGL::setMarks(QVector<YACReaderComicReadStatus> marks)
void YACReaderFlowGL::setMarkImage(QImage & image) void YACReaderFlowGL::setMarkImage(QImage & image)
{ {
Q_UNUSED(image); Q_UNUSED(image);
//qué pasa la primera vez?? //qué pasa la primera vez??
//deleteTexture(markTexture); //deleteTexture(markTexture);
//markTexture = bindTexture(image,GL_TEXTURE_2D,GL_RGBA,QGLContext::LinearFilteringBindOption | QGLContext::MipmapBindOption); //markTexture = bindTexture(image,GL_TEXTURE_2D,GL_RGBA,QGLContext::LinearFilteringBindOption | QGLContext::MipmapBindOption);
} }
@ -993,7 +996,7 @@ void YACReaderFlowGL::unmarkSlide(int index)
void YACReaderFlowGL::setSlideSize(QSize size) void YACReaderFlowGL::setSlideSize(QSize size)
{ {
Q_UNUSED(size); Q_UNUSED(size);
//TODO calcular el tamaño del widget //TODO calcular el tamaño del widget
} }
void YACReaderFlowGL::clear() void YACReaderFlowGL::clear()
{ {