diff options
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/drawing.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/hwpfilter/source/drawing.h b/hwpfilter/source/drawing.h index 3118ec0c8720..975dfaa0e8be 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; |