Commit 483ce7fc authored by cRTrn13's avatar cRTrn13

bd_destory() fix

parent 8c796d95
......@@ -42,7 +42,9 @@ void bd_close(BLURAY *bd)
dlclose(bd->h_libaacs);
file_close(bd->fp);
if (bd->fp) {
file_close(bd->fp);
}
DEBUG(DBG_BLURAY, "BLURAY destroyed! (0x%08x)\n", bd);
......
......@@ -13,14 +13,16 @@ int64_t file_tell_linux(FILE_H *file);
int file_read_linux(FILE_H *file, uint8_t *buf, int64_t size);
int file_write_linux(FILE_H *file, uint8_t *buf, int64_t size);
#include <stdio.h>
void file_close_linux(FILE_H *file)
{
fclose((FILE *)file->internal);
if (file) {
fclose((FILE *)file->internal);
DEBUG(DBG_FILE, "Closed LINUX file (0x%08x)\n", file);
DEBUG(DBG_FILE, "Closed LINUX file (0x%08x)\n", file);
X_FREE(file);
X_FREE(file);
}
}
int64_t file_seek_linux(FILE_H *file, int64_t offset, int32_t origin)
......
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