Skip to content

Commit c461694

Browse files
committed
fix(FormUtils): OnCheckboxCaptionClick callback
Now checks if the checkbox `OnChange` value is `nil` before calling it "lapified"
1 parent 1269994 commit c461694

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/forms/formutils.simba

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ begin
173173
checkbox := TLazCheckbox(caption.AnchorSideLeft.Control);
174174

175175
checkbox.Toggle();
176-
Lapify(checkbox.OnChange)(checkbox);
176+
if checkbox.OnChange <> nil then
177+
Lapify(checkbox.OnChange)(checkbox);
177178
end;
178179

179180
var

0 commit comments

Comments
 (0)