Added check for empty contours to avoid a crash.
Removed wrong return.
Merge branch 'bug-18329-CrashInLiveWireTool'