Avoid crash on gui when rendering from command line and no write access #3322

Merged
merged 1 commit into from Feb 4, 2017

Conversation

Projects
None yet
3 participants
@zonkmachine
Member

zonkmachine commented Feb 4, 2017

Fixes #2902

Something like this?

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Feb 4, 2017

Member

The other option is to fix it in AudioFileDevice.cpp
Add "GuiApplication.h" as suggested in #2902 printf something and EXIT_FAILURE when no gui. Both works just fine.

Member

zonkmachine commented Feb 4, 2017

The other option is to fix it in AudioFileDevice.cpp
Add "GuiApplication.h" as suggested in #2902 printf something and EXIT_FAILURE when no gui. Both works just fine.

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Feb 4, 2017

Member

Pushed method two on a separate commit for comparison. I vote no. 2

Member

zonkmachine commented Feb 4, 2017

Pushed method two on a separate commit for comparison. I vote no. 2

src/core/audio/AudioFileDevice.cpp
- ExportProjectDialog::tr( "Could not open file %1 "
+ QString title, message;
+ title = ExportProjectDialog::tr( "Could not open file" );
+ message = ExportProjectDialog::tr( "Could not open file %1 "
"for writing.\nPlease make "
"sure you have write-"
"permission to the file and "

This comment has been minimized.

@zonkmachine

zonkmachine Feb 4, 2017

Member

write-permission?

-> write permission

@zonkmachine

zonkmachine Feb 4, 2017

Member

write-permission?

-> write permission

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Feb 4, 2017

Member

Settled for no.2 . Done... 🚂

Member

zonkmachine commented Feb 4, 2017

Settled for no.2 . Done... 🚂

@tresf

tresf approved these changes Feb 4, 2017

src/core/audio/AudioFileDevice.cpp
+ }
+ else
+ {
+ printf( "%s\n", message.toUtf8().constData() );

This comment has been minimized.

@jasp00

jasp00 Feb 4, 2017

Member

fprintf( stderr, "%s\n",

@jasp00

jasp00 Feb 4, 2017

Member

fprintf( stderr, "%s\n",

This comment has been minimized.

@zonkmachine

zonkmachine Feb 4, 2017

Member

Fixed!

@jasp00

Code looks fine.

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Feb 4, 2017

Member

Thanks! Merge...

Member

zonkmachine commented Feb 4, 2017

Thanks! Merge...

@zonkmachine zonkmachine merged commit e40a6bc into LMMS:master Feb 4, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@zonkmachine zonkmachine deleted the zonkmachine:renderdirpermission branch Feb 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment