CHandle: restore the check for only setting the base_url before loading

parent aaef7bb3
Pipeline #78195 failed with stages
in 41 minutes and 39 seconds
......@@ -476,9 +476,12 @@ impl ObjectImpl for CHandle {
impl CHandle {
fn set_base_url(&self, url: &str) {
// if self.load_state.get() != LoadState::Start {
// panic!("Please set the base file or URI before loading any data into RsvgHandle",);
// }
let mut state = self.load_state.borrow();
match *state {
LoadState::Start => (),
_ => panic!("Please set the base file or URI before loading any data into RsvgHandle",),
}
match Url::parse(&url) {
Ok(u) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment