diff --git a/src/main.cpp b/src/main.cpp index f9f03b0..acf8b85 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -155,9 +155,14 @@ int main(int argc, char *argv[]) std::cout << "Rotation Time: " << rotationSeconds << std::endl; std::cout << "Overlay input: " << overlay << std::endl; } + Overlay o(overlay); o.setDebugMode(debugMode); - w.setOverlay(&o); + if (!overlay.empty()) + { + w.setOverlay(&o); + } + w.setAspect(aspect); w.setDebugMode(debugMode); w.setFitAspectAxisToWindow(fitAspectAxisToWindow); diff --git a/src/mainwindow.h b/src/mainwindow.h index bcd4225..5518be6 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -41,7 +41,7 @@ private: bool fitAspectAxisToWindow = false; QString overlayHexRGB; - Overlay* overlay; + Overlay* overlay = NULL; void drawText(QPixmap& image, int margin, int fontsize, QString text, int alignment);