Skip to content

Commit f63a572

Browse files
authored
Update src/core/others/ojph_file.cpp
1 parent e657f4a commit f63a572

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/others/ojph_file.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ namespace ojph {
215215
#else
216216
new_buf = (ui8*)aligned_alloc(4096, needed_size);
217217
#endif
218-
if (this->buf != new_buf && !clear_all){
218+
if (this-buf != nullptr && this->buf != new_buf && !clear_all){
219219
memcpy(new_buf, this->buf, used_size);
220220
#ifdef OJPH_OS_WINDOWS
221221
_aligned_free(this->buf);

0 commit comments

Comments
 (0)