From 6874d95c5df2e2afb897aa28506bd3514b650ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sun, 12 Oct 2014 00:07:56 +0200 Subject: [PATCH] fixed YACReaderFlowGL::remove out of bounds crash --- common/yacreader_flow_gl.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/yacreader_flow_gl.cpp b/common/yacreader_flow_gl.cpp index 5ce9e1dc..80d1d826 100644 --- a/common/yacreader_flow_gl.cpp +++ b/common/yacreader_flow_gl.cpp @@ -710,6 +710,9 @@ void YACReaderFlowGL::insert(char *name, GLuint Tex, float x, float y,int item) void YACReaderFlowGL::remove(int item) { + if(item < 0 || item >= paths.size()) + return; + startAnimationTimer(); loaded.remove(item); @@ -974,7 +977,7 @@ void YACReaderFlowGL::setMarks(QVector marks) void YACReaderFlowGL::setMarkImage(QImage & image) { Q_UNUSED(image); - //qué pasa la primera vez?? + //qué pasa la primera vez?? //deleteTexture(markTexture); //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) { Q_UNUSED(size); - //TODO calcular el tamaño del widget + //TODO calcular el tamaño del widget } void YACReaderFlowGL::clear() {