Skip to content

Commit

Permalink
Fix crash on OGG export with Qt >= 5.10 (#5813)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhysSong authored Nov 30, 2020
1 parent 6e08126 commit c49ca37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/audio/AudioFileOgg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ bool AudioFileOgg::startEncoding()
// We give our ogg file a random serial number and avoid
// 0 and UINT32_MAX which can get you into trouble.
#if (QT_VERSION >= QT_VERSION_CHECK(5,10,0))
QRandomGenerator::global()->seed(time(0));
// QRandomGenerator::global() is already initialized, and we can't seed() it.
m_serialNo = 0xD0000000 + QRandomGenerator::global()->generate() % 0x0FFFFFFF;
#else
qsrand(time(0));
Expand Down

0 comments on commit c49ca37

Please sign in to comment.