Tiny drawing patch

Added condition to check if the mouse's position is out of the map's
index.
Merge pull request #1 from galvaniccoffee/master

Tiny drawing patch