dogkisser / goonto

Install Goonto.
https://dogkisser.github.io/
GNU Affero General Public License v3.0
10 stars 0 forks source link

new_popup should use a guard over COUNT rather than manually modifying it #13

Closed dogkisser closed 10 months ago

dogkisser commented 10 months ago

unexpected early returns (like from using ?) in new_popup may result in a dangling COUNT. this has already happened.

    if image_path.is_empty() {
       *COUNT.get().unwrap().lock().unwrap() += 1;
        return Ok(())
    }

    let mut image = SharedImage::load(image_path)?;

(fixed)