NullPointerException

Little problem with NullPointerException  in ContextualUndoAdapter that
I had in my app.