File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -59,9 +59,9 @@ public class TreePanel : IFiddlerExtension
5959 #region "Methods"
6060
6161 /// <summary>
62- /// Default constructor
62+ /// Method to initialize all components
6363 /// </summary>
64- public TreePanel ( )
64+ public void Initialize ( )
6565 {
6666 this . ShowPanel = false ; // Default
6767
@@ -309,9 +309,16 @@ public void OnLoad()
309309 {
310310 // Locate the original sessions listview
311311 lvSessions = FiddlerApplication . UI . pnlSessions . Controls [ Constants . ListViewName ] as SessionListView ;
312- FiddlerApplication . UI . pnlSessions . SizeChanged += new EventHandler ( pnlSessions_SizeChanged ) ;
312+ if ( lvSessions == null )
313+ {
314+ MessageBox . Show ( "Unable to locate original sessions panel." , Constants . RegistryExtensionKeyName ) ;
315+ return ;
316+ }
317+
318+ this . Initialize ( ) ;
313319
314320 lvSessions . Invalidated += LvSessions_Invalidated ;
321+ FiddlerApplication . UI . pnlSessions . SizeChanged += new EventHandler ( pnlSessions_SizeChanged ) ;
315322
316323 // Create our TreeView
317324 tv = new CustomTreeView
You can’t perform that action at this time.
0 commit comments