Skip to content
Snippets Groups Projects
  • shiro's avatar
    135c21a6
    Prevent crash constructing string from nulltpr · 135c21a6
    shiro authored
    If XDG_CURRENT_DESKTOP isn't set, getenv returns a `nullptr`.
    Constructing a `std::string` from `nullptr` will throw an exception.
    This prevents a crash when not using a DE, but zenity or kdialog is
    installed regardless
    
    (also fixes a typo where the fallthrough attribute wasn't applied to
    anything due to a missing semicolon)
    135c21a6
    History
    Prevent crash constructing string from nulltpr
    shiro authored
    If XDG_CURRENT_DESKTOP isn't set, getenv returns a `nullptr`.
    Constructing a `std::string` from `nullptr` will throw an exception.
    This prevents a crash when not using a DE, but zenity or kdialog is
    installed regardless
    
    (also fixes a typo where the fallthrough attribute wasn't applied to
    anything due to a missing semicolon)