amiremohamadi/DuckX

doc.open crashes if doc is not a word document

Opened this issue · 1 comments

Describe the bug
Whenever .open is called on a Document object that has a directory that is not a word document the application crashes.

To Reproduce
Steps to reproduce the behavior:
create a project and add this code:
duckx::Document doc("test.docx");
doc.open();

make sure test.docx does not exist

run the code

Expected behavior
A new docx file named test should be crated, but instead the application crashes

Screenshots
image

Desktop (please complete the following information):

  • OS: windows 10

Additional context
Add any other context about the problem here.

Thank you @RuurddeRonde for reporting the bug.
We'll have a fix ready very soon ✌️