masm: Don't call fclose(nullptr) and initialize statics
Otherwise our disassembler crashes on QV4_SHOW_ASM. Change-Id: I63b20c0932452fe852773f91ebecaa7f31dd040d Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This commit is contained in:
parent
80d26c1508
commit
89a1d4ff3f
|
@ -66,7 +66,7 @@ uint32_t cryptographicallyRandomNumber()
|
|||
return 0;
|
||||
}
|
||||
|
||||
static FilePrintStream* s_dataFile;
|
||||
static FilePrintStream* s_dataFile = nullptr;
|
||||
|
||||
void setDataFile(FilePrintStream *ps)
|
||||
{
|
||||
|
|
|
@ -39,7 +39,8 @@ FilePrintStream::~FilePrintStream()
|
|||
{
|
||||
if (m_adoptionMode == Borrow)
|
||||
return;
|
||||
fclose(m_file);
|
||||
if (m_file)
|
||||
fclose(m_file);
|
||||
}
|
||||
|
||||
std::unique_ptr<FilePrintStream> FilePrintStream::open(const char* filename, const char* mode)
|
||||
|
|
Loading…
Reference in New Issue