[smuxi/stable] Frontend-GNOME: fix NRE thrown in Frontend.Quit()
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi/stable] Frontend-GNOME: fix NRE thrown in Frontend.Quit()
- Date: Mon, 25 Jan 2016 18:35:56 +0000 (UTC)
commit 51d0f49e205694a84754bb9353bb2ecf61da9a4d
Author: Mirco Bauer <meebey meebey net>
Date: Mon Jan 25 18:05:05 2016 +0100
Frontend-GNOME: fix NRE thrown in Frontend.Quit()
If starting Smuxi fails and thus _MainWindow hasn't been initialized yet then
calling Quit() throws a NullReferenceException.
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
at Smuxi.Frontend.Gnome.Frontend.Quit () [0x00011] in
/home/meebey/Projects/smuxi-stable/src/Frontend-GNOME/Frontend.cs:468
at Smuxi.Frontend.Gnome.Frontend.ShowException (Gtk.Window parent, System.Exception ex) [0x00149]
in /home/meebey/Projects/smuxi-stable/src/Frontend-GNOME/Frontend.cs:640
at Smuxi.Frontend.Gnome.Frontend.ShowException (System.Exception ex) [0x00023] in
/home/meebey/Projects/smuxi-stable/src/Frontend-GNOME/Frontend.cs:647
at Smuxi.Frontend.Gnome.MainClass.Main (System.String[] args) [0x0026d] in
/home/meebey/Projects/smuxi-stable/src/Frontend-GNOME/Main.cs:145
src/Frontend-GNOME/Frontend.cs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Frontend-GNOME/Frontend.cs b/src/Frontend-GNOME/Frontend.cs
index cf56b0a..805d43d 100644
--- a/src/Frontend-GNOME/Frontend.cs
+++ b/src/Frontend-GNOME/Frontend.cs
@@ -465,7 +465,7 @@ namespace Smuxi.Frontend.Gnome
Trace.Call();
// only save windows size when we are not in the engine manager dialog
- if (_MainWindow.Visible) {
+ if (_MainWindow != null && _MainWindow.Visible) {
// save window size
int width, heigth;
if (_MainWindow.IsMaximized) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]