Hmmm, ok, the edit you deleted, "Maybe a race condition where "untitled" is closed shortly before/after the editor-notify signal is sent?" might be close.
Did you connect to the editor notify signal "after"? In that case the standard Geany DND is actioned first, closing the untitled document, and then passing you its now defunct pointer.