Commit 9f32b2aa authored by stoutjesdijk's avatar stoutjesdijk 🎧
Browse files

add error handling for file open errors on head- and refrot

parent 2034b728
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -573,13 +573,21 @@ int main(

    if ( !isEmptyString( args.headRotationFilePath ) )
    {
        HeadRotationFileReader_open( args.headRotationFilePath, &headRotReader );
        if ( HeadRotationFileReader_open( args.headRotationFilePath, &headRotReader ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "Error opening file: %s\n", args.headRotationFilePath );
                exit( -1 );
            }
    }

#ifdef FIX_I109_ORIENTATION_TRACKING
    if ( !isEmptyString( args.referenceRotationFilePath ) )
    {
        HeadRotationFileReader_open( args.referenceRotationFilePath, &referenceRotReader );
        if ( HeadRotationFileReader_open( args.referenceRotationFilePath, &referenceRotReader ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "Error opening file: %s\n", args.referenceRotationFilePath );
                exit( -1 );
            }
    }
#endif