diff --git a/qglview/qglview.cpp b/qglview/qglview.cpp index 07710da..b079017 100644 --- a/qglview/qglview.cpp +++ b/qglview/qglview.cpp @@ -539,6 +539,7 @@ void QGLView::applyFog() { void QGLView::resizeGL(int width, int height) { if (!is_init) return; + if (width <= 0 || height <= 0) return; aspect = double(width) / double(height); if (renderer_) renderer_->resize(width, height); //qDebug() << "resize" << width << height;