Commit bbe8a32
authored
Do not throw from Win32Helper.GetFocusedWindowHandle()
This function is called during initialization, from a background thread.
An exception there will crash Excel if not handled.
Note that there is at least one case where this happens :
when Excel launches on a locked desktop (typically through a scheduled task).
Since there are already some cases where this function will return IntPtr.Zero,
it makes sense to default to this, rather than catch at the calling site.1 parent 568e79f commit bbe8a32
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
0 commit comments