Commit 9f83b226 authored by Philippe Rouquier's avatar Philippe Rouquier

Fix a crash when there is no medium inserted

parent 8a4c5dbc
......@@ -181,13 +181,16 @@ brasero_track_disc_get_size (BraseroTrack *track,
priv = BRASERO_TRACK_DISC_PRIVATE (track);
medium = brasero_drive_get_medium (priv->drive);
if (!medium)
return BRASERO_BURN_NOT_READY;
brasero_medium_get_data_size (medium, &medium_size, &medium_blocks);
if (blocks)
*blocks = medium_blocks;
if (block_size)
*block_size = medium_size / medium_blocks;
*block_size = medium_blocks? (medium_size / medium_blocks):0;
return BRASERO_BURN_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment