summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hwpfilter/source/drawing.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/hwpfilter/source/drawing.h b/hwpfilter/source/drawing.h
index 806a48748bf7..c720c3b947ff 100644
--- a/hwpfilter/source/drawing.h
+++ b/hwpfilter/source/drawing.h
@@ -374,16 +374,13 @@ static HWPDrawingObject *LoadDrawingObject(void)
// drawing object can be list.
// hdo = current item, head = list;
- if (hdo != nullptr)
+ if (hdo->type < 0 || hdo->type >= HWPDO_NITEMS)
{
- if (hdo->type < 0 || hdo->type >= HWPDO_NITEMS)
- {
- hdo->type = HWPDO_RECT;
- }
-
- HWPDOFunc(hdo, OBJFUNC_FREE, nullptr, 0);
- delete hdo;
+ hdo->type = HWPDO_RECT;
}
+ HWPDOFunc(hdo, OBJFUNC_FREE, nullptr, 0);
+ delete hdo;
+
if( prev )
{
prev->next = nullptr;