]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/gtkgensurf/dec.cpp
q3map2: fix a leak (an allocated string not being freed before returning)
[xonotic/netradiant.git] / contrib / gtkgensurf / dec.cpp
index 3a96410e13640ea772781a090046a4896c905cd9..158a43020231cf432ad8c678aa3a06b08973eb18 100644 (file)
@@ -158,7 +158,7 @@ void MakeDecimatedMap( int *NumNodes, int *NumTris, NODE **pNode, TRI **pTri ){
                                 */
                                g_FuncTable.m_pfnMessageBox( g_pRadiantWnd,
                                                                                         "Error: Couldn't find the triangle bounding a point.",
-                                                                                        "Decimation Error",MB_ICONEXCLAMATION, NULL );
+                                                                                        "Decimation Error", eMB_OK, eMB_ICONWARNING );
                                return;
                        }
                        if ( !Tri[Node[i].tri].flag ) {
@@ -272,7 +272,7 @@ void MakeDecimatedMap( int *NumNodes, int *NumTris, NODE **pNode, TRI **pTri ){
                                 */
                                g_FuncTable.m_pfnMessageBox( g_pRadiantWnd,
                                                                                         "Error: Couldn't find the triangle bounding a point.",
-                                                                                        "Decimation Error",MB_ICONEXCLAMATION, NULL );
+                                                                                        "Decimation Error", eMB_OK, eMB_ICONWARNING );
                                return;
                        }
                        if ( !Tri[Node[i].tri].flag ) {
@@ -459,7 +459,7 @@ int tricall( int NumNodes, NODE *Node, int *NumTris, TRI **inTri, TRI **Tri, con
        out.edgelist           = (int *) NULL;   /* Needed only if -e switch used. */
        out.edgemarkerlist     = (int *) NULL;   /* Needed if -e used and -B not used. */
 
-       triangulate( (char *) Options, &in, &out, NULL );
+       triangulate( Options, &in, &out, NULL );
 
        NumTris[0] = out.numberoftriangles;
        *Tri = (TRI *) malloc( NumTris[0] * sizeof( TRI ) );