We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 85aba71 + 973d489 commit 816490aCopy full SHA for 816490a
1 file changed
src/gui/src/gui.cpp
@@ -1450,6 +1450,10 @@ void Gui::gifStart(const std::string& filename)
1450
logger_->error(utl::GUI, 49, "Cannot generate GIF without GUI enabled");
1451
}
1452
1453
+ if (filename.empty()) {
1454
+ logger_->error(utl::GUI, 81, "Filename is required to save a GIF.");
1455
+ }
1456
+
1457
gif_ = std::make_unique<GIF>();
1458
gif_->filename = filename;
1459
gif_->writer = nullptr;
@@ -1546,6 +1550,15 @@ void Gui::gifEnd()
1546
1550
return;
1547
1551
1548
1552
1553
+ if (gif_->writer == nullptr) {
1554
+ logger_->warn(utl::GUI,
1555
+ 75,
1556
+ "Nothing to save to {}. No frames added to gif.",
1557
+ gif_->filename);
1558
+ gif_ = nullptr;
1559
+ return;
1560
1561
1549
1562
GifEnd(gif_->writer.get());
1563
gif_ = nullptr;
1564
0 commit comments