Skip to content

Commit

Permalink
Fixed NullReferenceException error while Quicken is running.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JohnstonJ committed Sep 1, 2015
1 parent c59a876 commit a6c95e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public static int Main(string[] args) {
Assembly asm = Assembly.Load("qw");
Type t = asm.GetType("QuickenWindow.Program");
MethodInfo m = t.GetMethod("Main", BindingFlags.NonPublic | BindingFlags.Static);
return (int)m.Invoke(null, null);
m.Invoke(null, null);
return 0;
} catch (Exception ex) {
MessageBox(IntPtr.Zero, ex.ToString(), "QWLaunch error", 0);
return 1;
Expand Down

0 comments on commit a6c95e5

Please sign in to comment.