That code is saying "if there are lines in the side listbox, then do this" - it doesn't matter where abouts you click. In any event, nothing there would generate an error and you don't need the "else { return }" part at all.

What commands are you trying to execute in the "do some things" part?