app: allow passing a NULL buffer to gimp_drawable_set_buffer[_full]()
... which clears the drawable's buffer, performing any necessary cleanup, without setting a new buffer. While the drawable has no buffer, it can only be used in a very limited way, in particular, it may be destroyed, and it may be assigned a new buffer. This is used by the next commit to implement gimp_drawable_steal_buffer(), which transfers a buffer from one drawable to another in a safe manner, leaving the source drawable empty.
Showing with 62 additions and 30 deletions