diff options
| author | aura <nw@moneybot.cc> | 2026-03-04 00:51:18 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-03-04 00:51:18 +0100 |
| commit | 890bea19359649695df1b618a41ce580cf3dfbda (patch) | |
| tree | 8bc10ae4e613b0ad57fae9a68cec38c7d59cf067 /src/editor/view3d.cpp | |
| parent | 61aea7311c2e1af78fd9da544499f2198f2da1dd (diff) | |
| parent | be91342733fd56d1e7bafe72e82a8ac4dc67b79d (diff) | |
Merge branch 'ui-rework'
Diffstat (limited to 'src/editor/view3d.cpp')
| -rw-r--r-- | src/editor/view3d.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/editor/view3d.cpp b/src/editor/view3d.cpp index 3729823..292760a 100644 --- a/src/editor/view3d.cpp +++ b/src/editor/view3d.cpp @@ -48,7 +48,7 @@ void gui_editor_3dview_draw_showpos( GUI_EDITOR_3DVIEW* view ) { void gui_editor_3dview_draw_fn( void* ptr ) { GUI_EDITOR_3DVIEW* view = (GUI_EDITOR_3DVIEW*)ptr; - if( !objl->pl ) + if( !editor || !editor->map || !objl->pl ) return; I32 x = gui_relx( view ); @@ -82,6 +82,9 @@ void gui_editor_3dview_draw_fn( void* ptr ) { void gui_editor_3dview_input_fn( void* ptr ) { GUI_EDITOR_3DVIEW* view = (GUI_EDITOR_3DVIEW*)ptr; + if( !editor || !editor->map ) + return; + if( !input.mouselock ) gui_base_input_fn( view ); @@ -108,6 +111,9 @@ void gui_editor_3dview_create_toolbar( GUI_EDITOR_3DVIEW* view ) { I32 x = 1, y = view->h - 4; gui_button( x, y, 90, 18, "compile bsp", pfn( void* b ) { + if( !editor || !editor->map ) + return; + if( editor->map->bsp ) bsp_free( editor->map->bsp ); bsp_build_map( editor->map ); |
