Browse Source

Timeline: Don't assert if peakfile contains no blocks---it's probably just because it was just opened and hasn't been written into yet.

tags/non-daw-v1.3.0
Jonathan Moore Liles 2 years ago
parent
commit
20dce6c6e6
1 changed files with 17 additions and 4 deletions
  1. +17
    -4
      timeline/src/Engine/Peaks.C

+ 17
- 4
timeline/src/Engine/Peaks.C View File

@@ -188,7 +188,10 @@ public:
}

if ( ! blocks.size() )
FATAL( "Peak file contains no blocks!" );
{
DWARNING( "Peak file contains no blocks, maybe it's still being generated?");
return;
}

blocks.sort();

@@ -258,9 +261,19 @@ public:

scan( chunksize );

assert( _chunksize );

return true;
/* assert( _chunksize ); */

if ( blocks.size() )
{
return true;
}
else
{
DWARNING( "Peak file could not be opened: no blocks" );
fclose(_fp);
_fp = NULL;
return false;
}
}

bool


Loading…
Cancel
Save