[vlmc-devel] Fixes a crash on save
Barun Parruck
git at videolan.org
Sun Mar 6 14:09:52 CET 2016
vlmc | branch: master | Barun Parruck <barun.parruck at gmail.com> | Sun Mar 6 17:04:19 2016 +0530| [b8268643850d09cb58735f82b23e0a7b21a20712] | committer: Hugo Beauzée-Luyssen
Fixes a crash on save
If you closed the project window (setting m_project_file to NULL), and tried to save, a crash would occur.
This patch extends functionality to prompt for a project name if m_project_file is NULL.
Projects can now be saved again with this workaround for now..
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> https://code.videolan.org/videolan/vlmc/commit/b8268643850d09cb58735f82b23e0a7b21a20712
---
src/Gui/MainWindow.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 12a25ec..2df028a 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -334,7 +334,14 @@ MainWindow::initVlmcPreferences()
void
MainWindow::on_actionSave_triggered()
{
- Core::getInstance()->project()->save();
+ if ( Core::getInstance()->project()->hasProjectFile() == false )
+ {
+ this->on_actionSave_As_triggered();
+ }
+ else
+ {
+ Core::getInstance()->project()->save();
+ }
}
void
More information about the Vlmc-devel
mailing list