Bug 462384

Summary: Palette editor missing catch for zero division
Product: [Applications] krita Reporter: bradychance10
Component: Color SelectorsAssignee: Halla Rempt <halla>
Status: RESOLVED FIXED    
Severity: minor CC: ghevan, halla
Priority: NOR    
Version: 5.1.3   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Crash log from this error

Description bradychance10 2022-11-29 07:54:33 UTC
Created attachment 154131 [details]
Crash log from this error

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. In Palette docker:
2. Open Palette Editor
3. Select value for "Columns of Swatches:", type "0" (zero)

OBSERVED RESULT
 Crash

EXPECTED RESULT
 Replaced with either 1 or original value

SOFTWARE/OS VERSIONS
Windows: 5.1.3
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
 Should be an easy fix, catch the exception and return it to its previous value (or 1 if you'd find that easier). Have a good {"Day", "Night"} // :)
Comment 1 Halla Rempt 2022-11-29 11:25:15 UTC
I actually fixed this in https://invent.kde.org/graphics/krita/-/merge_requests/1617
Comment 2 vanyossi 2023-06-01 00:52:14 UTC
Since the MR is merged, let's mark this as fixed