How is he going to get in trouble if he doesn't do anything? You can't get in trouble for just being gay - do you think there are no gay men in Qatar or something! There are lots. Generally the main concern is about the relationships between men and women, and protecting women's honour - homsexuality, while definitely forbidden, is not something people think a lot about here.