Fix some absurd capitalization as well as insta-crashing when config files are absent
This commit is contained in:
@@ -48,10 +48,12 @@ func OpenImage(path string, c chan string) {
|
||||
var im *ueberzug.Image
|
||||
if path != "stop" {
|
||||
extractedImage := GetImagePath(path)
|
||||
img2, _ := GetImg(extractedImage)
|
||||
im, _ = ueberzug.NewImage(img2,
|
||||
int(float32(ui.ImgX)*fw)+viper.GetInt("ADDITIONAL_PADDING_X"),
|
||||
int(float32(ui.ImgY)*fh)+viper.GetInt("ADDITIONAL_PADDING_Y"))
|
||||
img2, err := GetImg(extractedImage)
|
||||
if err == nil {
|
||||
im, _ = ueberzug.NewImage(img2,
|
||||
int(float32(ui.ImgX)*fw)+viper.GetInt("ADDITIONAL_PADDING_X"),
|
||||
int(float32(ui.ImgY)*fh)+viper.GetInt("ADDITIONAL_PADDING_Y"))
|
||||
}
|
||||
}
|
||||
d := <-c
|
||||
if im != nil {
|
||||
|
||||
Reference in New Issue
Block a user