Fix nil pointer crash in Convert module benchmark indicator
When benchmark settings are already applied, benchmarkIndicator is nil but was being added to the container unconditionally, causing a crash during UI layout. Changes: - Conditionally build back bar items array - Only append benchmarkIndicator if it's not nil - Prevents SIGSEGV when opening Convert module with applied benchmark 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e951f40894
commit
88b318c5e4
14
main.go
14
main.go
|
|
@ -6318,15 +6318,19 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
|||
}
|
||||
}
|
||||
|
||||
backBar := ui.TintedBar(convertColor, container.NewHBox(
|
||||
// Build back bar with optional benchmark indicator
|
||||
backBarItems := []fyne.CanvasObject{
|
||||
back,
|
||||
layout.NewSpacer(),
|
||||
navButtons,
|
||||
layout.NewSpacer(),
|
||||
benchmarkIndicator,
|
||||
cmdPreviewBtn,
|
||||
queueBtn,
|
||||
))
|
||||
}
|
||||
if benchmarkIndicator != nil {
|
||||
backBarItems = append(backBarItems, benchmarkIndicator)
|
||||
}
|
||||
backBarItems = append(backBarItems, cmdPreviewBtn, queueBtn)
|
||||
|
||||
backBar := ui.TintedBar(convertColor, container.NewHBox(backBarItems...))
|
||||
|
||||
var updateCover func(string)
|
||||
var coverDisplay *widget.Label
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user