Don't crash when opening a Gambas source file as an external file.
[DEVELOPMENT ENVIRONMENT] * BUG: Don't crash when opening a Gambas source file as an external file.
This commit is contained in:
parent
e9bc65686c
commit
8200600168
2 changed files with 5 additions and 0 deletions
|
@ -1371,6 +1371,8 @@ Public Sub InitEditorWithBreakpoints(hEditor As FEditor)
|
|||
Dim I As Integer
|
||||
Dim sPrefix As String
|
||||
|
||||
If Project.IsFake() Then Return
|
||||
|
||||
sPrefix = hEditor.Name & "."
|
||||
While I < $aBreakpoint.Count
|
||||
sBreakpoint = $aBreakpoint[I]
|
||||
|
|
|
@ -1041,6 +1041,7 @@ Public Function CanSetBreakpoint(iLine As Integer) As Boolean
|
|||
Dim sLine As String
|
||||
Dim iPos As Integer
|
||||
|
||||
If Project.IsFake() Then Return
|
||||
If iLine < 0 Or If iLine >= $hEditor.Count Then Return
|
||||
|
||||
'$hEditor[iLine].Refresh
|
||||
|
@ -1082,6 +1083,7 @@ Public Sub CheckBreakpoints()
|
|||
|
||||
Dim iLine As Integer
|
||||
|
||||
If Project.IsFake() Then Return
|
||||
For Each iLine In $hEditor.Breakpoints
|
||||
If Not CanSetBreakpoint(iLine) Then SetBreakpoint(iLine, False, False)
|
||||
Next
|
||||
|
@ -3350,6 +3352,7 @@ End
|
|||
|
||||
Public Sub mnuBreakpoint_Click()
|
||||
|
||||
If Not CanSetBreakpoint($hEditor.Line) Then Return
|
||||
Design.SetBreakpoint(Me.Name & "." & CStr($hEditor.Line), Not HasBreakpoint($hEditor.Line))
|
||||
|
||||
End
|
||||
|
|
Loading…
Reference in a new issue