Skip to content

Commit a6c95e5

Browse files
committed
Fixed NullReferenceException error while Quicken is running.
Sometimes this error would harmlessly appear while Quicken was running due to a bug on our end. This was due to the fact that their Main function returns void, not int.
1 parent c59a876 commit a6c95e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ public static int Main(string[] args) {
1616
Assembly asm = Assembly.Load("qw");
1717
Type t = asm.GetType("QuickenWindow.Program");
1818
MethodInfo m = t.GetMethod("Main", BindingFlags.NonPublic | BindingFlags.Static);
19-
return (int)m.Invoke(null, null);
19+
m.Invoke(null, null);
20+
return 0;
2021
} catch (Exception ex) {
2122
MessageBox(IntPtr.Zero, ex.ToString(), "QWLaunch error", 0);
2223
return 1;

0 commit comments

Comments
 (0)