forked from KolibriOS/kolibrios
kiv: fix a bug (crash) after image rotation, fix memory leak.
git-svn-id: svn://kolibrios.org@8496 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
3ae83680d2
commit
de8931dae4
@ -466,10 +466,11 @@ button:
|
|||||||
mov eax, [cur_image]
|
mov eax, [cur_image]
|
||||||
cmp eax, [orig_image]
|
cmp eax, [orig_image]
|
||||||
jz @f
|
jz @f
|
||||||
invoke img.destroy, [cur_image]
|
push dword[esp]
|
||||||
mov [cur_image], 0
|
invoke img.rotate, [cur_image]
|
||||||
@@:
|
@@:
|
||||||
invoke img.rotate, [orig_image]
|
invoke img.rotate, [orig_image]
|
||||||
|
mov [bNewImage], 1
|
||||||
jmp redraw_all
|
jmp redraw_all
|
||||||
|
|
||||||
; rotate right
|
; rotate right
|
||||||
@ -1676,6 +1677,11 @@ proc scale_none_calc
|
|||||||
|
|
||||||
mov [scale_mode], LIBIMG_SCALE_NONE
|
mov [scale_mode], LIBIMG_SCALE_NONE
|
||||||
|
|
||||||
|
mov eax, [cur_image]
|
||||||
|
cmp eax, [orig_image]
|
||||||
|
jz @f
|
||||||
|
invoke img.destroy, eax
|
||||||
|
@@:
|
||||||
mov eax, [orig_image]
|
mov eax, [orig_image]
|
||||||
mov [cur_image], eax
|
mov [cur_image], eax
|
||||||
mov [cur_frame], eax
|
mov [cur_frame], eax
|
||||||
|
Loading…
Reference in New Issue
Block a user