diff options
| author | kasull <qsullian@gmail.com> | 2026-03-03 18:49:43 -0500 |
|---|---|---|
| committer | kasull <qsullian@gmail.com> | 2026-03-03 18:49:43 -0500 |
| commit | be91342733fd56d1e7bafe72e82a8ac4dc67b79d (patch) | |
| tree | 0b87d812dd90b54df35279b06a7beca9de84c965 /src/editor/view3d.cpp | |
| parent | 5c4e9c8b140b14ba9671b8efcc47d71c6c4f2217 (diff) | |
fix use after freeui-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 ); |
