Fix marker in no buffer error for task state change in an indirect buffer
* lisp/org-clock.el (org-clock-out-if-current): Fix marker in no buffer error
for task state change in an indirect buffer
org-clock-out-when-current was enhanced in
098cf35 (Clock: Clock out
when done also in indirect buffers, 2009-03-23) to handle indirect
buffers.
This enhancement uses (buffer-base-buffer (org-clocking-buffer)) but
when not clocking (org-clocking-buffer) returns nil - so
buffer-base-buffer returns the base buffer of the current buffer which
is never nil. This leads to marker in no buffer errors trying to stop
the clock when it is not running.
Now we explicitly check up front that the clock is running before
any other conditions that lead to stopping the clock.