From: Arthur Wolf Date: Mon, 30 May 2016 18:57:24 +0000 (+0200) Subject: file existence check was inverted, resulting in a crash when trying to open on_boot... X-Git-Url: https://git.hcoop.net/clinton/Smoothieware.git/commitdiff_plain/084ac1a5692f2ec3ba52b3f60a063c9208d33ae3 file existence check was inverted, resulting in a crash when trying to open on_boot.gcode --- diff --git a/src/modules/utils/player/Player.cpp b/src/modules/utils/player/Player.cpp index 3a4cdf09..fc3681ae 100644 --- a/src/modules/utils/player/Player.cpp +++ b/src/modules/utils/player/Player.cpp @@ -212,7 +212,7 @@ bool Player::prepare_playing(){ this->current_file_handler = fopen( this->filename.c_str(), "r"); // Check whether that succeeded or not - bool file_opened = (this->current_file_handler == NULL); + bool file_opened = (this->current_file_handler != NULL); // If the file was open, get it's size if( file_opened ){