22B. Powers of High Court of Justiciary and sheriff to vary orders on conviction
(1) Subsection (2) applies where -
(a) the High Court of Justiciary (the "High Court") is dealing with a person who -
(i) has been convicted by or before the High Court of having committed a serious offence in Scotland, or
(ii) has been convicted by or before the sheriff of having committed a serious offence in Scotland and by virtue of section 195 of the Criminal Procedure (Scotland) Act 1995 has been remitted by the sheriff to the High Court for sentencing; or
(b) the sheriff is dealing with a person who has been convicted by or before the sheriff of having committed a serious offence in Scotland.
(2) The High Court or (as the case may be) the sheriff may -
(a) in the case of a person who is the subject of a serious crime prevention order in Scotland; and
(b) in addition to dealing with the person in relation to the offence,