Commit 90e0976
fix(bq_driver): stop empty dialog areas acting as a documentation link
Clicking a blank part of the DSN setup dialog or the Advanced Options dialog
could open a browser at the BigQuery ODBC/JDBC drivers page.
Both dialogs hit-test WM_LBUTTONDOWN against the documentation hyperlink's
rectangle, but the CreateHyperlinkLabel calls that would create that control
are currently commented out. GetDlgItem therefore returns NULL,
GetClientRect(NULL, &rect) fails and leaves 'rect' holding whatever was on
the stack, and PtInRect matches that uninitialised rectangle -- so clicks on
unrelated parts of the dialog launch the browser. Which clicks match varies
between runs, since it depends on stack contents.
Bail out when the control does not exist or its rectangle cannot be read, and
zero-initialise the rectangle so it can never hold garbage.1 parent 704eeb0 commit 90e0976
2 files changed
Lines changed: 24 additions & 6 deletions
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
642 | 653 | | |
643 | 654 | | |
644 | 655 | | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | 656 | | |
649 | 657 | | |
650 | 658 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
911 | 924 | | |
912 | 925 | | |
913 | 926 | | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | 927 | | |
918 | 928 | | |
919 | 929 | | |
| |||
0 commit comments