image::paste throws exception if graphics or image is empty

This commit is contained in:
Jinhao
2015-07-13 00:23:54 +08:00
parent 17556cae99
commit 1eb76307e4
15 changed files with 59 additions and 642 deletions

View File

@@ -618,7 +618,7 @@ namespace paint
{
pixel_buffer pixbuf(handle_, 0, 0);
pixbuf.blur(r, radius);
pixbuf.paste(handle_, 0, 0);
pixbuf.paste(handle_, point{});
}
}
@@ -677,7 +677,7 @@ namespace paint
}
delete [] tablebuf;
pixbuf.paste(handle_, 0, 0);
pixbuf.paste(handle_, point{});
if(changed_ == false) changed_ = true;
}
}
@@ -1074,7 +1074,7 @@ namespace paint
if (pxbuf_.open(handle_))
{
pxbuf_.gradual_rectangle(rct, from, to, 0.0, vertical);
pxbuf_.paste(handle_, 0, 0);
pxbuf_.paste(handle_, point{});
}
#elif defined(NANA_X11)
if (nullptr == handle_) return;