Revision e2770306

View differences:

scout/scoutsim/src/sim_frame.cpp
101 101
        display_map_name = map_base_name;
102 102

  
103 103
        wxBitmap lines_bitmap;
104
        lines_bitmap.LoadFile(wxString::FromAscii(map_lines_name.c_str()));
104
        wxBitmap walls_bitmap;
105
        path_bitmap.LoadFile(wxString::FromAscii(display_map_name.c_str()));
106

  
107
        // Try to load the file; if it fails, make a new blank file
108
        if (!lines_bitmap.LoadFile(wxString::FromAscii(map_lines_name.c_str())))
109
        {
110
            lines_bitmap = wxBitmap(path_bitmap.GetWidth(), path_bitmap.GetHeight(), 3);
111
        }
105 112
        lines_image = lines_bitmap.ConvertToImage();
106 113

  
107
        wxBitmap walls_bitmap;
108
        walls_bitmap.LoadFile(wxString::FromAscii(map_walls_name.c_str()));
114
        // Try to load the file; if it fails, make a new blank file
115
        if (!walls_bitmap.LoadFile(wxString::FromAscii(map_walls_name.c_str())))
116
        {
117
            walls_bitmap = wxBitmap(path_bitmap.GetWidth(), path_bitmap.GetHeight(), 3);
118
        }
109 119
        walls_image = walls_bitmap.ConvertToImage();
110 120

  
111 121
        clear();

Also available in: Unified diff